Yggdrasill
0.2
|
Base class (template) to supply your node class with metainformation. More...
#include <ziptree.hpp>
Protected Member Functions | |
void | update_rank () noexcept |
Update the stored rank in this node. More... | |
Protected Attributes | |
Node * | _bst_children [2] |
DefaultParentContainer< Node > | _bst_parent |
Friends | |
template<class , class , bool , bool > | |
class | ztree_internal::ZTreeRankGenerator |
Base class (template) to supply your node class with metainformation.
The class you use as nodes for the Zip Tree must derive from this class (template). It supplies your class with the necessary members to contain the linking between the tree nodes.
Node | The node class itself. Yes, that's the class derived from this template. This sounds weird, but is correct. See the examples if you're confused. |
options | The options class (a version of TreeOptions) that you parameterize the tree with. (See the options parameter of ZTree.) |
Tag | The tag used to identify the tree that this node should be inserted into. See ZTree for details. |
|
inlineprotectednoexcept |
Update the stored rank in this node.
If you configure your ZTree to generate the nodes' ranks from hashes (i.e., set TreeFlags::ZTREE_USE_HASH) and to store the nodes' ranks (i.e., set TreeFlags::ZTREE_RANK_TYPE), you must call this method before adding the node to your tree, but after the node's hash has become valid.