| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Attributes
TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem > Class Template Reference

Class that represents a node of a TeAdaptativeKdTree. More...

`#include <TeKdTree.h>`

List of all members.

## Public Types

typedef NodeKey | kdKey
| Export key type.
typedef NodeData | kdData
| Export data type.
typedef NodeDataItem | kdDataItem
| Export data item type.

## Public Member Functions

| TeAdaptativeKdTreeNode (const double &k)
| Constructor.
void | setKey (const double &k)
| Sets the key to the node.
const double & | getKey (void) const
| Returns a reference to node key.
void | setData (const NodeData &data)
| Sets the data in the node.
NodeData & | getData (void)
| Returns a reference to data node.
void | setDiscriminator (const char &d)
| Sets the data in the node.
const char & | getDiscriminator (void) const
| Returns a reference to discriminator.
void | setLeft (TeAdaptativeKdTreeNode *node)
| Sets the left child pointer.
void | setRight (TeAdaptativeKdTreeNode *node)
| Sets the right child pointer.
TeAdaptativeKdTreeNode * | getLeft (void) const
| Accessor for left child.
TeAdaptativeKdTreeNode * | getRight (void) const
| Accessor for right child.
bool | hasLeft (void) const
| Method to check if this has a left child.
bool | hasRight (void) const
| Method to check if a this has a right child.
bool | isLeaf (void) const
| Method to check if this has no children.
unsigned int | descendants (void) const
| Method to count the number of nodes below this.

## Protected Attributes

double | key_
| The key used to access this record.
NodeData | data_
| The data stored in this record.
char | discriminator_
| The discriminator used in partition.
TeAdaptativeKdTreeNode * | left_
| Pointer to the left sub-tree.
TeAdaptativeKdTreeNode * | right_
| Pointer to the right sub-tree.

## Detailed Description

### template<class NodeKey, class NodeData, class NodeDataItem>
class TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >

Class that represents a node of a TeAdaptativeKdTree.

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.

WARNING:

1. The key must have methods called x() and y().

2. These kind of node stores the data only in the leafs.

3. The leaf nodes contains a set of values that forms a bucket (the size is controlled by the tree methods tha use this class).

## Member Typedef Documentation

template<class NodeKey , class NodeData , class NodeDataItem >

typedef NodeData TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::kdData

Export data type.

template<class NodeKey , class NodeData , class NodeDataItem >

typedef NodeDataItem TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::kdDataItem

Export data item type.

template<class NodeKey , class NodeData , class NodeDataItem >

typedef NodeKey TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::kdKey

Export key type.

## Constructor & Destructor Documentation

template<class NodeKey , class NodeData , class NodeDataItem >

TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::TeAdaptativeKdTreeNode | ( | const double & | k | ) | `[inline]`

Constructor.

## Member Function Documentation

template<class NodeKey , class NodeData , class NodeDataItem >

unsigned int TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::descendants | ( | void |  | ) | const`[inline]`

Method to count the number of nodes below this.

template<class NodeKey , class NodeData , class NodeDataItem >

NodeData& TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::getData | ( | void |  | ) | `[inline]`

Returns a reference to data node.

template<class NodeKey , class NodeData , class NodeDataItem >

const char& TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::getDiscriminator | ( | void |  | ) | const`[inline]`

Returns a reference to discriminator.

template<class NodeKey , class NodeData , class NodeDataItem >

const double& TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::getKey | ( | void |  | ) | const`[inline]`

Returns a reference to node key.

template<class NodeKey , class NodeData , class NodeDataItem >

TeAdaptativeKdTreeNode* TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::getLeft | ( | void |  | ) | const`[inline]`

Accessor for left child.

template<class NodeKey , class NodeData , class NodeDataItem >

TeAdaptativeKdTreeNode* TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::getRight | ( | void |  | ) | const`[inline]`

Accessor for right child.

template<class NodeKey , class NodeData , class NodeDataItem >

bool TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::hasLeft | ( | void |  | ) | const`[inline]`

Method to check if this has a left child.

template<class NodeKey , class NodeData , class NodeDataItem >

bool TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::hasRight | ( | void |  | ) | const`[inline]`

Method to check if a this has a right child.

template<class NodeKey , class NodeData , class NodeDataItem >

bool TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::isLeaf | ( | void |  | ) | const`[inline]`

Method to check if this has no children.

template<class NodeKey , class NodeData , class NodeDataItem >

void TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::setData | ( | const NodeData & | data | ) | `[inline]`

Sets the data in the node.

template<class NodeKey , class NodeData , class NodeDataItem >

void TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::setDiscriminator | ( | const char & | d | ) | `[inline]`

Sets the data in the node.

template<class NodeKey , class NodeData , class NodeDataItem >

void TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::setKey | ( | const double & | k | ) | `[inline]`

Sets the key to the node.

template<class NodeKey , class NodeData , class NodeDataItem >

void TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::setLeft | ( | TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem > * | node | ) | `[inline]`

Sets the left child pointer.

template<class NodeKey , class NodeData , class NodeDataItem >

void TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::setRight | ( | TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem > * | node | ) | `[inline]`

Sets the right child pointer.

## Member Data Documentation

template<class NodeKey , class NodeData , class NodeDataItem >

NodeData TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::data_`[protected]`

The data stored in this record.

template<class NodeKey , class NodeData , class NodeDataItem >

char TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::discriminator_`[protected]`

The discriminator used in partition.

template<class NodeKey , class NodeData , class NodeDataItem >

double TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::key_`[protected]`

The key used to access this record.

template<class NodeKey , class NodeData , class NodeDataItem >

TeAdaptativeKdTreeNode* TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::left_`[protected]`

Pointer to the left sub-tree.

template<class NodeKey , class NodeData , class NodeDataItem >

TeAdaptativeKdTreeNode* TeSAM::TeAdaptativeKdTreeNode< NodeKey, NodeData, NodeDataItem >::right_`[protected]`

Pointer to the right sub-tree.

The documentation for this class was generated from the following file:

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeKdTree.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines