A binary space partitioning tree, such as KD or ball tree. More...
Public Types | |
typedef TBound | Bound |
typedef TDataset | Dataset |
typedef TStatistic | Statistic |
Public Member Functions | |
index_t | begin () const |
Gets the index of the begin point of this subset. | |
Bound & | bound () |
const Bound & | bound () const |
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. | |
GeneralBinarySpaceTree * | FindByBeginCount (index_t begin_q, index_t count_q) |
Find a node in this tree by its begin and count (const). | |
const GeneralBinarySpaceTree * | 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) |
bool | is_leaf () const |
GeneralBinarySpaceTree * | left () const |
Gets the left branch of the tree. | |
OT_DEF (GeneralBinarySpaceTree) | |
void | Print () const |
GeneralBinarySpaceTree * | right () const |
Gets the right branch. | |
void | set_children (const Dataset &data, GeneralBinarySpaceTree *left_in, GeneralBinarySpaceTree *right_in) |
Used only when constructing the tree. | |
Statistic & | stat () |
const Statistic & | stat () const |
Public Attributes | |
index_t | begin_ |
Bound | bound_ |
index_t | count_ |
GeneralBinarySpaceTree * | left_ |
GeneralBinarySpaceTree * | right_ |
Statistic | stat_ |
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 60 of file general_spacetree.h.
index_t GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::begin | ( | ) | const [inline] |
Gets the index of the begin point of this subset.
Definition at line 220 of file general_spacetree.h.
index_t GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::count | ( | ) | const [inline] |
Gets the number of points in this subset.
Definition at line 234 of file general_spacetree.h.
index_t GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::end | ( | ) | const [inline] |
Gets the index one beyond the last index in the series.
Definition at line 227 of file general_spacetree.h.
GeneralBinarySpaceTree* GeneralBinarySpaceTree< 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 149 of file general_spacetree.h.
References GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().
const GeneralBinarySpaceTree* GeneralBinarySpaceTree< 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 123 of file general_spacetree.h.
References GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().
Referenced by GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().
GeneralBinarySpaceTree* GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::left | ( | ) | const [inline] |
Gets the left branch of the tree.
Definition at line 204 of file general_spacetree.h.
GeneralBinarySpaceTree* GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::right | ( | ) | const [inline] |
Gets the right branch.
Definition at line 212 of file general_spacetree.h.
void GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::set_children | ( | const Dataset & | data, | |
GeneralBinarySpaceTree< TBound, TDataset, TStatistic > * | left_in, | |||
GeneralBinarySpaceTree< TBound, TDataset, TStatistic > * | right_in | |||
) | [inline] |
Used only when constructing the tree.
Definition at line 169 of file general_spacetree.h.