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 NodeDataTag | kdDataTag |
| Export data type. More... | |
| typedef NodeKey | kdKey |
| Export key type. More... | |
Public Member Functions | |
| 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 NodeKey & | getKey () const |
| It returns a reference to node key. More... | |
| Node * | getLeft () const |
| It gets the left child. More... | |
| Node * | 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... | |
| Node (const NodeKey &k) | |
| Constructor. More... | |
| void | setData (const NodeData &data) |
| It sets the data in the node. More... | |
| void | setKey (const NodeKey &k) |
| It sets the key to the node. More... | |
| void | setLeft (Node *node) |
| It sets the left child pointer. More... | |
| void | setRight (Node *node) |
| It sets the right child pointer. More... | |
Protected Attributes | |
| NodeData | m_data |
| The data stored in this record. More... | |
| NodeKey | m_key |
| The key used to access this record. More... | |
| Node * | m_left |
| Pointer to the left sub-tree. More... | |
| Node * | m_right |
| Pointer to the right sub-tree. More... | |
Private Member Functions | |
| Node (const Node &rhs) | |
| No copy constructor allowed. More... | |
| Node & | operator= (const Node &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), one key used for insertion of the data into the tree.
Definition at line 61 of file kdtree/Node.h.
| typedef NodeData te::sam::kdtree::Node< NodeKey, NodeData, NodeDataItem, NodeDataTag >::kdData |
Export data type.
Definition at line 69 of file kdtree/Node.h.
| typedef NodeDataItem te::sam::kdtree::Node< NodeKey, NodeData, NodeDataItem, NodeDataTag >::kdDataItem |
Export data item type.
Definition at line 72 of file kdtree/Node.h.
| typedef NodeDataTag te::sam::kdtree::Node< NodeKey, NodeData, NodeDataItem, NodeDataTag >::kdDataTag |
Export data type.
Definition at line 75 of file kdtree/Node.h.
| typedef NodeKey te::sam::kdtree::Node< NodeKey, NodeData, NodeDataItem, NodeDataTag >::kdKey |
Export key type.
Definition at line 66 of file kdtree/Node.h.
|
inline |
Constructor.
Definition at line 78 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 152 of file kdtree/Node.h.
|
inline |
It returns a reference to data node.
Definition at line 104 of file kdtree/Node.h.
|
inline |
It returns a reference to node key.
Definition at line 92 of file kdtree/Node.h.
|
inline |
It gets the left child.
Definition at line 122 of file kdtree/Node.h.
|
inline |
It gets the right child.
Definition at line 128 of file kdtree/Node.h.
|
inline |
It checks if this node has a left child.
Definition at line 134 of file kdtree/Node.h.
|
inline |
It checks if this node has a right child.
Definition at line 140 of file kdtree/Node.h.
|
inline |
It returns true if this node is a leaf node.
Definition at line 146 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 98 of file kdtree/Node.h.
|
inline |
It sets the key to the node.
Definition at line 86 of file kdtree/Node.h.
|
inline |
It sets the left child pointer.
Definition at line 110 of file kdtree/Node.h.
|
inline |
It sets the right child pointer.
Definition at line 116 of file kdtree/Node.h.
|
protected |
The data stored in this record.
Definition at line 187 of file kdtree/Node.h.
|
protected |
The key used to access this record.
Definition at line 186 of file kdtree/Node.h.
|
protected |
Pointer to the left sub-tree.
Definition at line 188 of file kdtree/Node.h.
|
protected |
Pointer to the right sub-tree.
Definition at line 189 of file kdtree/Node.h.