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.
Definition at line 206 of file kdtree/Node.h.
| typedef NodeData te::sam::kdtree::AdaptativeNode< NodeKey, NodeData, NodeDataItem >::kdData |
Export data type.
Definition at line 214 of file kdtree/Node.h.
| typedef NodeDataItem te::sam::kdtree::AdaptativeNode< NodeKey, NodeData, NodeDataItem >::kdDataItem |
Export data item type.
Definition at line 217 of file kdtree/Node.h.
| typedef NodeKey te::sam::kdtree::AdaptativeNode< NodeKey, NodeData, NodeDataItem >::kdKey |
Export key type.
Definition at line 211 of file kdtree/Node.h.
|
inline |
Constructor.
Definition at line 220 of file kdtree/Node.h.
|
private |
No copy constructor allowed.
| rhs | The other node. |
|
inline |
It counts the number of nodes below this.
Definition at line 307 of file kdtree/Node.h.
|
inline |
It returns a reference to data node.
Definition at line 247 of file kdtree/Node.h.
|
inline |
It returns a reference to discriminator.
Definition at line 259 of file kdtree/Node.h.
|
inline |
It returns a reference to node key.
Definition at line 235 of file kdtree/Node.h.
|
inline |
It gets the left child.
Definition at line 277 of file kdtree/Node.h.
|
inline |
It gets the right child.
Definition at line 283 of file kdtree/Node.h.
|
inline |
It checks if this node has a left child.
Definition at line 289 of file kdtree/Node.h.
|
inline |
It checks if this node has a right child.
Definition at line 295 of file kdtree/Node.h.
|
inline |
It returns true if this node is a leaf node.
Definition at line 301 of file kdtree/Node.h.
|
private |
No assignment operator allowed.
| rhs | The other node. |
|
inline |
It sets the data in the node.
Definition at line 241 of file kdtree/Node.h.
|
inline |
|
inline |
It sets the key to the node.
Definition at line 229 of file kdtree/Node.h.
|
inline |
It sets the left child pointer.
Definition at line 265 of file kdtree/Node.h.
|
inline |
It sets the right child pointer.
Definition at line 271 of file kdtree/Node.h.
|
protected |
The data stored in this record.
Definition at line 342 of file kdtree/Node.h.
|
protected |
The discriminator used in partition.
Definition at line 343 of file kdtree/Node.h.
|
protected |
The key used to access this record.
Definition at line 341 of file kdtree/Node.h.
|
protected |
Pointer to the left sub-tree.
Definition at line 344 of file kdtree/Node.h.
|
protected |
Pointer to the right sub-tree.
Definition at line 345 of file kdtree/Node.h.