5 # include <tpl_binTreeOps.H>
29 template <
template <
typename>
class NodeType,
typename Key,
class Compare>
34 typedef NodeType<Key> Node;
51 std::swap(root, tree.root);
52 std::swap(cmp, tree.cmp);
62 : head(&headNode), root(headNode.getR()), cmp(__cmp)
68 : head(&headNode), root(headNode.getR()), cmp(__cmp)
89 bool verify() {
return check_binary_search_tree<Node, Compare>(root); }
96 return check_binary_search_tree<Node, Compare>(root);
194 Node *
remove(
const Key & key)
198 return ret != Node::NullPtr ? ret : NULL;
215 tree.root = Node::NullPtr;
234 template <
typename Key,
class Compare = Aleph::less<Key> >
239 BinTree(Compare && cmp = Compare())
268 template <
typename Key,
class Compare = Aleph::less<Key> >
Compare & get_compare()
Definition: tpl_binTree.H:59
Compare & key_comp()
Retorna una referencia al criterio de comparación.
Definition: tpl_binTree.H:56
Node *& getRoot()
Retorna la raíz del árbol binario de búsqueda.
Definition: tpl_binTree.H:92
Definition: tpl_binTree.H:235
Node * insert(Node *p)
Definition: tpl_binTree.H:107
void join(GenBinTree &tree, GenBinTree &dup)
Definition: tpl_binTree.H:212
Definition: tpl_binTree.H:30
void split_key_dup_rec(Node *root, const typename Node::key_type &key, Node *&ts, Node *&tg)
Definition: tpl_binNodeUtils.H:2121
bool split_key_rec(Node *root, const typename Node::key_type &key, Node *&ts, Node *&tg)
Definition: tpl_binNodeUtils.H:2067
bool split_dup(const Key &key, GenBinTree &l, GenBinTree &r)
Definition: tpl_binTree.H:177
Node * search_or_insert(Node *p)
Definition: tpl_binTree.H:139
Node * search(const Key &key)
Definition: tpl_binTree.H:82
Definition: tpl_binTree.H:269
bool split(const Key &key, GenBinTree &l, GenBinTree &r)
Definition: tpl_binTree.H:159
Node * insert_dup(Node *p)
Definition: tpl_binTree.H:120
Definition: tpl_binTreeOps.H:25