diff options
Diffstat (limited to 'meowpp/dsa/SplayTree.hpp')
-rw-r--r-- | meowpp/dsa/SplayTree.hpp | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/meowpp/dsa/SplayTree.hpp b/meowpp/dsa/SplayTree.hpp index de08f63..3b08c14 100644 --- a/meowpp/dsa/SplayTree.hpp +++ b/meowpp/dsa/SplayTree.hpp @@ -1,3 +1,9 @@ +#include "SplayTree.h" + + +#include <cstdlib> + +#include <utility> namespace meow{ ///////////////////////////// **# Node #** ///////////////////////// @@ -161,20 +167,6 @@ namespace meow{ __left->syncUp(); return __left; } - // - template<class Key, class Value> - inline void SplayTree<Key, Value>::print(Node* __now, int __depth) const{ - if(__now == NULL) return ; - printf("%*s [%llX]:(%lu)\tParent=%llX Left=%llX Right=%llX\n", - __depth * 2, "", - (long long unsigned)__now, - __now->_size, - (long long unsigned)__now->_parent, - (long long unsigned)__now->_child[0], - (long long unsigned)__now->_child[1]); - print(__now->_child[0], __depth + 1); - print(__now->_child[1], __depth + 1); - } ///////////////////////// **# Element ##* ////////////////////////// template<class Key, class Value> inline void SplayTree<Key, Value>::Element::reset(Node* __node){ @@ -441,10 +433,5 @@ namespace meow{ __tree2->_root = NULL; return true; } - template<class Key, class Value> - inline void - SplayTree<Key, Value>::print() const{ - print(_root, 0); - } } |