A class that represents an Kd-tree node. More...
#include <Node.h>
Public Types | |
| typedef NodeData | kdData |
| Export data type. More... | |
| typedef NodeDataItem | kdDataItem |
| Export data item type. More... | |
| typedef NodeKey | kdKey |
| Export key type. More... | |
Public Member Functions | |
| AdaptativeNode (const double &k) | |
| Constructor. More... | |
| std::size_t | descendants () const |
| It counts the number of nodes below this. More... | |
| NodeData & | getData () |
| It returns a reference to data node. More... | |
| const char & | getDiscriminator () const |
| It returns a reference to discriminator. More... | |
| const double & | getKey () const |
| It returns a reference to node key. More... | |
| AdaptativeNode * | getLeft () const |
| It gets the left child. More... | |
| AdaptativeNode * | getRight () const |
| It gets the right child. More... | |
| bool | hasLeft () const |
| It checks if this node has a left child. More... | |
| bool | hasRight () const |
| It checks if this node has a right child. More... | |
| bool | isLeaf () const |
| It returns true if this node is a leaf node. More... | |
| void | setData (const NodeData &data) |
| It sets the data in the node. More... | |
| void | setDiscriminator (const char &d) |
| It sets the data in the node. More... | |
| void | setKey (const double &k) |
| It sets the key to the node. More... | |
| void | setLeft (AdaptativeNode *node) |
| It sets the left child pointer. More... | |
| void | setRight (AdaptativeNode *node) |
| It sets the right child pointer. More... | |
Protected Attributes | |
| NodeData | m_data |
| The data stored in this record. More... | |
| char | m_discriminator |
| The discriminator used in partition. More... | |
| double | m_key |
| The key used to access this record. More... | |
| AdaptativeNode * | m_left |
| Pointer to the left sub-tree. More... | |
| AdaptativeNode * | m_right |
| Pointer to the right sub-tree. More... | |
Private Member Functions | |
| AdaptativeNode (const AdaptativeNode &rhs) | |
| No copy constructor allowed. More... | |
| AdaptativeNode & | operator= (const AdaptativeNode &rhs) |
| No assignment operator allowed. More... | |
A class that represents an Kd-tree node.
Each node contains a pointer to its left and right subtree (NULL if it is not set), a discriminator that indicates the axis of partition, the partition key and a set of data-items.
| typedef NodeData te::sam::kdtree::AdaptativeNode< NodeKey, NodeData, NodeDataItem >::kdData |
| typedef NodeDataItem te::sam::kdtree::AdaptativeNode< NodeKey, NodeData, NodeDataItem >::kdDataItem |
| typedef NodeKey te::sam::kdtree::AdaptativeNode< NodeKey, NodeData, NodeDataItem >::kdKey |
|
inline |
|
private |
No copy constructor allowed.
| rhs | The other node. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
No assignment operator allowed.
| rhs | The other node. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |