From 77c444139bbbc5c91c7061b9851aeb4ba1995959 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Mon, 23 Jul 2018 13:13:32 +0200 Subject: [PATCH] some more stuff for the avl tree --- bintree.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bintree.h b/bintree.h index 2b3a940..31521f3 100644 --- a/bintree.h +++ b/bintree.h @@ -426,6 +426,10 @@ public: return node; } + inline + bool in_tree(Node* node) + { return (node->tree == this); } + #ifdef DUMP void dump() { @@ -452,9 +456,13 @@ public: { Base::remove(static_cast(node)); } inline - T* find(Key_type key) + T* lookup(Key_type key) { return static_cast(Base::lookup(key)); } + inline + bool in_tree(T* node) + { return Base::in_tree(static_cast(node)); } + #ifdef DUMP inline void dump()