![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/stree/Builder.h>
Protected Types | |
typedef Tree< K, T, C >::node_t | node_t |
Protected Member Functions | |
node_t * | allocate (t::uint32 n) |
int | make (node_t *nodes, int &s, int start, int end) |
Very simple allocator that creates a power of 2 number of nodes for elm::stree::Tree class.
K | Key type. |
T | Retrieven item type. |
C | Comparator to compare keys (default to Comparator<K>). |
Allocate an array of nodes whose number is the closest greater number of power of 2.
n | Power of the number of nodes. |
Referenced by MarkerBuilder< K, T, C >::make(), and SegmentBuilder< K, T, C >::make().
|
inlineprotected |
Initialize the structure of the tree. @notice The keys of the nodes should have been initialized first.
nodes | Array of nodes. |
s | Parent node. |
start | Start index. |
end | End index. |
Referenced by Builder< K, T, Comparator< K > >::make(), MarkerBuilder< K, T, C >::make(), and SegmentBuilder< K, T, C >::make().