Elm
1.0
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>). |
|
protected |
|
protected |
Allocate an array of nodes whose number is the closest greater number of power of 2.
n | Power of the number of nodes. |
References elm::leastUpperPowerOf2().
Referenced by elm::stree::MarkerBuilder< K, T, C >::make(), and elm::stree::SegmentBuilder< K, T, C >::make().
|
protected |
Initialize the structure of the tree. 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 elm::stree::MarkerBuilder< K, T, C >::make(), and elm::stree::SegmentBuilder< K, T, C >::make().