26#ifndef __TERRALIB_SAM_KDTREE_INTERNAL_NODE_H
27#define __TERRALIB_SAM_KDTREE_INTERNAL_NODE_H
61 template<
class NodeKey,
class NodeData,
class NodeDataItem,
class NodeDataTag = kd_node_m_datasingle_tag>
class Node
154 std::size_t totalLeft = 0;
155 std::size_t totalRight = 0;
163 return totalLeft + totalRight;
309 std::size_t totalLeft = 0;
310 std::size_t totalRight = 0;
318 return totalLeft + totalRight;
NodeData & getData()
It returns a reference to data node.
AdaptativeNode * getRight() const
It gets the right child.
const double & getKey() const
It returns a reference to node key.
std::size_t descendants() const
It counts the number of nodes below this.
std::vector< te::gm::Point > m_data
AdaptativeNode(const AdaptativeNode &rhs)
No copy constructor allowed.
AdaptativeNode * getLeft() const
It gets the left child.
void setRight(AdaptativeNode *node)
It sets the right child pointer.
void setDiscriminator(const char &d)
It sets the data in the node.
const char & getDiscriminator() const
It returns a reference to discriminator.
bool isLeaf() const
It returns true if this node is a leaf node.
void setData(const NodeData &data)
It sets the data in the node.
bool hasLeft() const
It checks if this node has a left child.
void setLeft(AdaptativeNode *node)
It sets the left child pointer.
bool hasRight() const
It checks if this node has a right child.
void setKey(const double &k)
It sets the key to the node.
std::vector< te::gm::Point > kdData
AdaptativeNode(const double &k)
Constructor.
AdaptativeNode & operator=(const AdaptativeNode &rhs)
No assignment operator allowed.
Node(const Node &rhs)
No copy constructor allowed.
void setLeft(Node *node)
It sets the left child pointer.
te::sam::kdtree::kd_node_m_datasingle_tag kdDataTag
Node(const NodeKey &k)
Constructor.
Node * getLeft() const
It gets the left child.
void setKey(const NodeKey &k)
It sets the key to the node.
bool hasRight() const
It checks if this node has a right child.
bool hasLeft() const
It checks if this node has a left child.
Node & operator=(const Node &rhs)
No assignment operator allowed.
bool isLeaf() const
It returns true if this node is a leaf node.
void setData(const NodeDataItem &data)
It sets the data in the node.
std::size_t descendants() const
It counts the number of nodes below this.
Node * getRight() const
It gets the right child.
const NodeKey & getKey() const
It returns a reference to node key.
NodeDataItem & getData()
It returns a reference to data node.
void setRight(Node *node)
It sets the right child pointer.
This is the namespace for the K-d Tree Spatial Access Method.
This is the namespace for the TerraLib Spatial Access Methods module.
Kd-Tree node type for nodes with multuple elements (used by template instantiation).
Kd-tree node type for nodes with single elements (used by template instantiation).