A class that represents an Kd-tree node. More...
#include <Node.h>
Public Types | |
| typedef NodeData | kdData |
| Export data type. | |
| typedef NodeDataItem | kdDataItem |
| Export data item type. | |
| typedef NodeDataTag | kdDataTag |
| Export data type. | |
| typedef NodeKey | kdKey |
| Export key type. | |
Public Member Functions | |
| std::size_t | descendants () const |
| It counts the number of nodes below this. | |
| NodeDataItem & | getData () |
| It returns a reference to data node. | |
| const NodeKey & | getKey () const |
| It returns a reference to node key. | |
| Node * | getLeft () const |
| It gets the left child. | |
| Node * | getRight () const |
| It gets the right child. | |
| bool | hasLeft () const |
| It checks if this node has a left child. | |
| bool | hasRight () const |
| It checks if this node has a right child. | |
| bool | isLeaf () const |
| It returns true if this node is a leaf node. | |
| Node (const NodeKey &k) | |
| Constructor. | |
| void | setData (const NodeDataItem &data) |
| It sets the data in the node. | |
| void | setKey (const NodeKey &k) |
| It sets the key to the node. | |
| void | setLeft (Node *node) |
| It sets the left child pointer. | |
| void | setRight (Node *node) |
| It sets the right child pointer. | |
Protected Attributes | |
| NodeDataItem | m_data |
| The data stored in this record. | |
| NodeKey | m_key |
| The key used to access this record. | |
| Node * | m_left |
| Pointer to the left sub-tree. | |
| Node * | m_right |
| Pointer to the right sub-tree. | |
Private Member Functions | |
| Node (const Node &rhs) | |
| No copy constructor allowed. | |
| Node & | operator= (const Node &rhs) |
| No assignment operator allowed. | |
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.
| typedef NodeData te::sam::kdtree::Node< NodeKey, NodeData, NodeDataItem, NodeDataTag >::kdData |
| typedef NodeDataItem te::sam::kdtree::Node< NodeKey, NodeData, NodeDataItem, NodeDataTag >::kdDataItem |
| typedef NodeDataTag te::sam::kdtree::Node< NodeKey, NodeData, NodeDataItem, NodeDataTag >::kdDataTag |
| typedef NodeKey te::sam::kdtree::Node< NodeKey, NodeData, NodeDataItem, NodeDataTag >::kdKey |
|
inline |
|
private |
No copy constructor allowed.
| rhs | The other node. |
|
inline |
It counts the number of nodes below this.
Definition at line 152 of file Node.h.
Referenced by te::sam::kdtree::Node< te::gm::Coord2D, std::size_t, std::size_t, te::sam::kdtree::kd_node_m_datasingle_tag >::descendants().
|
inline |
|
inline |
|
inline |
It gets the left child.
Definition at line 122 of file Node.h.
Referenced by te::sam::kdtree::Node< te::gm::Coord2D, std::size_t, std::size_t, te::sam::kdtree::kd_node_m_datasingle_tag >::descendants().
|
inline |
It gets the right child.
Definition at line 128 of file Node.h.
Referenced by te::sam::kdtree::Node< te::gm::Coord2D, std::size_t, std::size_t, te::sam::kdtree::kd_node_m_datasingle_tag >::descendants().
|
inline |
It checks if this node has a left child.
Definition at line 134 of file Node.h.
Referenced by te::sam::kdtree::Node< te::gm::Coord2D, std::size_t, std::size_t, te::sam::kdtree::kd_node_m_datasingle_tag >::descendants(), and te::sam::kdtree::Node< te::gm::Coord2D, std::size_t, std::size_t, te::sam::kdtree::kd_node_m_datasingle_tag >::isLeaf().
|
inline |
It checks if this node has a right child.
Definition at line 140 of file Node.h.
Referenced by te::sam::kdtree::Node< te::gm::Coord2D, std::size_t, std::size_t, te::sam::kdtree::kd_node_m_datasingle_tag >::descendants(), and te::sam::kdtree::Node< te::gm::Coord2D, std::size_t, std::size_t, te::sam::kdtree::kd_node_m_datasingle_tag >::isLeaf().
|
inline |
|
private |
No assignment operator allowed.
| rhs | The other node. |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |