some more stuff for the avl tree
This commit is contained in:
parent
381bcd1de9
commit
77c444139b
1 changed files with 9 additions and 1 deletions
10
bintree.h
10
bintree.h
|
@ -426,6 +426,10 @@ public:
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool in_tree(Node* node)
|
||||||
|
{ return (node->tree == this); }
|
||||||
|
|
||||||
#ifdef DUMP
|
#ifdef DUMP
|
||||||
void dump()
|
void dump()
|
||||||
{
|
{
|
||||||
|
@ -452,9 +456,13 @@ public:
|
||||||
{ Base::remove(static_cast<typename Base::Node*>(node)); }
|
{ Base::remove(static_cast<typename Base::Node*>(node)); }
|
||||||
|
|
||||||
inline
|
inline
|
||||||
T* find(Key_type key)
|
T* lookup(Key_type key)
|
||||||
{ return static_cast<T*>(Base::lookup(key)); }
|
{ return static_cast<T*>(Base::lookup(key)); }
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool in_tree(T* node)
|
||||||
|
{ return Base::in_tree(static_cast<Base::Node*>(node)); }
|
||||||
|
|
||||||
#ifdef DUMP
|
#ifdef DUMP
|
||||||
inline
|
inline
|
||||||
void dump()
|
void dump()
|
||||||
|
|
Loading…
Reference in a new issue