A binary space partitioning tree, such as KD or ball tree. More...
Public Types | |
typedef TBound | Bound |
typedef TBound | Bound |
typedef TDataset | Dataset |
typedef TDataset | Dataset |
typedef TStatistic | Statistic |
typedef TStatistic | Statistic |
Public Member Functions | |
index_t | begin () const |
Gets the index of the begin point of this subset. | |
index_t | begin () const |
Gets the index of the begin point of this subset. | |
Bound & | bound () |
const Bound & | bound () const |
Bound & | bound () |
const Bound & | bound () const |
index_t | count () const |
Gets the number of points in this subset. | |
index_t | count () const |
Gets the number of points in this subset. | |
index_t | end () const |
Gets the index one beyond the last index in the series. | |
index_t | end () const |
Gets the index one beyond the last index in the series. | |
BinarySpaceTree * | FindByBeginCount (index_t begin_q, index_t count_q) |
Find a node in this tree by its begin and count (const). | |
const BinarySpaceTree * | FindByBeginCount (index_t begin_q, index_t count_q) const |
Find a node in this tree by its begin and count. | |
BinarySpaceTree * | FindByBeginCount (index_t begin_q, index_t count_q) |
Find a node in this tree by its begin and count (const). | |
const BinarySpaceTree * | FindByBeginCount (index_t begin_q, index_t count_q) const |
Find a node in this tree by its begin and count. | |
void | Init (index_t begin_in, index_t count_in) |
void | Init (index_t begin_in, index_t count_in) |
bool | is_leaf () const |
bool | is_leaf () const |
BinarySpaceTree * | left () const |
Gets the left branch of the tree. | |
BinarySpaceTree * | left () const |
Gets the left branch of the tree. | |
void | Print () const |
void | Print () const |
BinarySpaceTree * | right () const |
Gets the right branch. | |
BinarySpaceTree * | right () const |
Gets the right branch. | |
void | set_children (const Dataset &data, BinarySpaceTree *left_in, BinarySpaceTree *right_in) |
Used only when constructing the tree. | |
void | set_children (const Dataset &data, BinarySpaceTree *left_in, BinarySpaceTree *right_in) |
Used only when constructing the tree. | |
Statistic & | stat () |
const Statistic & | stat () const |
Statistic & | stat () |
const Statistic & | stat () const |
A binary space partitioning tree, such as KD or ball tree.
This particular tree forbids you from having more children.
TBound | the bounding type of each child (TODO explain interface) | |
TDataset | the data set type | |
TStatistic | extra data in the node |
Definition at line 61 of file spacetree.h.
index_t BinarySpaceTree< TBound, TDataset, TStatistic >::begin | ( | ) | const [inline] |
Gets the index of the begin point of this subset.
Definition at line 223 of file spacetree.h.
index_t BinarySpaceTree< TBound, TDataset, TStatistic >::begin | ( | ) | const [inline] |
Gets the index of the begin point of this subset.
Definition at line 223 of file spacetree.h.
Referenced by AllkNN::ComputeBaseCase_(), AllkFN::ComputeBaseCase_(), and AllNN::GNPBaseCase_().
index_t BinarySpaceTree< TBound, TDataset, TStatistic >::count | ( | ) | const [inline] |
Gets the number of points in this subset.
Definition at line 237 of file spacetree.h.
index_t BinarySpaceTree< TBound, TDataset, TStatistic >::count | ( | ) | const [inline] |
Gets the number of points in this subset.
Definition at line 237 of file spacetree.h.
index_t BinarySpaceTree< TBound, TDataset, TStatistic >::end | ( | ) | const [inline] |
Gets the index one beyond the last index in the series.
Definition at line 230 of file spacetree.h.
index_t BinarySpaceTree< TBound, TDataset, TStatistic >::end | ( | ) | const [inline] |
Gets the index one beyond the last index in the series.
Definition at line 230 of file spacetree.h.
Referenced by AllkNN::ComputeBaseCase_(), AllkFN::ComputeBaseCase_(), and AllNN::GNPBaseCase_().
BinarySpaceTree* BinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount | ( | index_t | begin_q, | |
index_t | count_q | |||
) | [inline] |
Find a node in this tree by its begin and count (const).
Every node is uniquely identified by these two numbers. This is useful for communicating position over the network, when pointers would be invalid.
Definition at line 150 of file spacetree.h.
References BinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().
const BinarySpaceTree* BinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount | ( | index_t | begin_q, | |
index_t | count_q | |||
) | const [inline] |
Find a node in this tree by its begin and count.
Every node is uniquely identified by these two numbers. This is useful for communicating position over the network, when pointers would be invalid.
Definition at line 124 of file spacetree.h.
References BinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().
BinarySpaceTree* BinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount | ( | index_t | begin_q, | |
index_t | count_q | |||
) | [inline] |
Find a node in this tree by its begin and count (const).
Every node is uniquely identified by these two numbers. This is useful for communicating position over the network, when pointers would be invalid.
Definition at line 150 of file spacetree.h.
References BinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().
const BinarySpaceTree* BinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount | ( | index_t | begin_q, | |
index_t | count_q | |||
) | const [inline] |
Find a node in this tree by its begin and count.
Every node is uniquely identified by these two numbers. This is useful for communicating position over the network, when pointers would be invalid.
Definition at line 124 of file spacetree.h.
References BinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().
Referenced by BinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().
BinarySpaceTree* BinarySpaceTree< TBound, TDataset, TStatistic >::left | ( | ) | const [inline] |
Gets the left branch of the tree.
Definition at line 207 of file spacetree.h.
BinarySpaceTree* BinarySpaceTree< TBound, TDataset, TStatistic >::left | ( | ) | const [inline] |
Gets the left branch of the tree.
Definition at line 207 of file spacetree.h.
Referenced by AllkNN::ComputeDualNeighborsRecursion_(), AllkFN::ComputeNeighborsRecursion_(), and AllNN::GNPRecursion_().
BinarySpaceTree* BinarySpaceTree< TBound, TDataset, TStatistic >::right | ( | ) | const [inline] |
Gets the right branch.
Definition at line 215 of file spacetree.h.
BinarySpaceTree* BinarySpaceTree< TBound, TDataset, TStatistic >::right | ( | ) | const [inline] |
Gets the right branch.
Definition at line 215 of file spacetree.h.
Referenced by AllkNN::ComputeDualNeighborsRecursion_(), AllkFN::ComputeNeighborsRecursion_(), and AllNN::GNPRecursion_().
void BinarySpaceTree< TBound, TDataset, TStatistic >::set_children | ( | const Dataset & | data, | |
BinarySpaceTree< TBound, TDataset, TStatistic > * | left_in, | |||
BinarySpaceTree< TBound, TDataset, TStatistic > * | right_in | |||
) | [inline] |
Used only when constructing the tree.
Definition at line 170 of file spacetree.h.
void BinarySpaceTree< TBound, TDataset, TStatistic >::set_children | ( | const Dataset & | data, | |
BinarySpaceTree< TBound, TDataset, TStatistic > * | left_in, | |||
BinarySpaceTree< TBound, TDataset, TStatistic > * | right_in | |||
) | [inline] |
Used only when constructing the tree.
Definition at line 170 of file spacetree.h.