24template<
typename Node>
32 ->
decltype (node->m_children[index]) &
34 return node->m_children[index];
46template<
typename Node>
56 return node->m_parent;
64template<
typename Base>
68 using typename Base::node_type;
76template<
typename Base>
80 using typename Base::node_type;
86 Base::parent (node) = new_parent;
104template<
typename Accessors>
108 using typename Accessors::node_type;
119 template<
typename Pr
inter>
123 using Accessors::set_parent;
126 static void set_child (node_type,
unsigned int, node_type);
130 template<
unsigned int N>
135 template<
typename Pr
inter>
145template<
typename Accessors>
151 using typename Accessors::node_type;
185 template<
typename Comparator>
186 bool insert (node_type new_node, Comparator compare);
316 template<
typename Comparator>
348 template<
typename LeftPredicate,
typename RightPredicate>
349 int lookup (LeftPredicate want_something_smaller,
350 RightPredicate want_something_bigger);
354 template<
typename LeftPredicate,
typename RightPredicate>
356 RightPredicate want_something_bigger);
363 template<
typename Pr
inter>
371 using parent::set_parent;
373 template<
unsigned int N>
380template<
typename Accessors>
390template<
typename Node>
431template<
typename Accessors>
441 using typename Accessors::node_type;
453 static void splay (node_type node);
478 template<
typename DefaultResult,
typename Predicate>
498 using parent::set_parent;
504 template<
unsigned int N>
516template<
typename Node>
520#include "splay-tree-utils.tcc"
Definition splay-tree-utils.h:106
static void set_child(node_type, unsigned int, node_type)
static node_type promote_child(node_type, unsigned int)
static void print(pretty_printer *pp, node_type node, Printer printer, char, vec< char > &)
static node_type splay_limit(node_type)
static void insert_child(node_type node, unsigned int index, node_type child)
static node_type remove_node_internal(node_type)
static void print(pretty_printer *pp, node_type node, Printer printer)
static node_type get_child(node_type, unsigned int)
static void promote_child(node_type, unsigned int, node_type)
Definition splay-tree-utils.h:49
Node node_type
Definition splay-tree-utils.h:51
static auto parent(node_type node) -> decltype(node->m_parent) &
Definition splay-tree-utils.h:54
Definition splay-tree-utils.h:26
Node node_type
Definition splay-tree-utils.h:28
static auto child(node_type node, unsigned int index) -> decltype(node->m_children[index]) &
Definition splay-tree-utils.h:31
Definition genmatch.cc:834
Definition pretty-print.h:238
Definition splay-tree-utils.h:147
auto lookup(Comparator compare) -> decltype(compare(m_root))
rooted_splay_tree split_after_root()
node_type m_root
Definition splay-tree-utils.h:155
bool remove_root_and_splay_next()
rooted_splay_tree split_before_root()
rooted_splay_tree()
Definition splay-tree-utils.h:158
void insert_max_node(node_type new_node)
rooted_splay_tree(node_type root)
Definition splay-tree-utils.h:161
node_type operator->()
Definition splay-tree-utils.h:170
void insert_relative(int comparison, node_type new_node)
void replace_max_node_at_root(node_type new_node)
int lookup_le(LeftPredicate want_something_smaller, RightPredicate want_something_bigger)
void splice_next_tree(rooted_splay_tree next_tree)
void print(pretty_printer *pp, Printer printer) const
node_type root() const
Definition splay-tree-utils.h:164
bool insert(node_type new_node, Comparator compare)
int lookup(LeftPredicate want_something_smaller, RightPredicate want_something_bigger)
Definition splay-tree-utils.h:432
static int compare_nodes_one_way(node_type, node_type)
static unsigned int child_index(node_type, node_type)
static int compare_nodes(node_type node1, node_type node2)
static node_type remove_node(node_type node)
static void splay_known_limit(node_type)
static void splay_known_min_node(node_type node)
static node_type get_parent(node_type)
static void splay_known_max_node(node_type node)
static void splay(node_type node)
static auto splay_and_search(node_type node, DefaultResult default_result, Predicate predicate) -> decltype(predicate(node, 0))
Definition splay-tree-utils.h:78
static void set_parent(node_type node, node_type new_parent)
Definition splay-tree-utils.h:84
Definition splay-tree-utils.h:66
static void set_parent(node_type, node_type)
Definition splay-tree-utils.h:70
Definition splay-tree-utils.h:395
T m_value
Definition splay-tree-utils.h:406
splay_tree_node()=default
T & value()
Definition splay-tree-utils.h:402
splay_tree_node * m_children[2]
Definition splay-tree-utils.h:407
Definition compare-elim.cc:91
#define bool
Definition system.h:893