GeneralBinarySpaceTree< TBound, TDataset, TStatistic > Class Template Reference

A binary space partitioning tree, such as KD or ball tree. More...

Collaboration diagram for GeneralBinarySpaceTree< TBound, TDataset, TStatistic >:
[legend]

List of all members.

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.
GeneralBinarySpaceTreeFindByBeginCount (index_t begin_q, index_t count_q)
 Find a node in this tree by its begin and count (const).
const GeneralBinarySpaceTreeFindByBeginCount (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
GeneralBinarySpaceTreeleft () const
 Gets the left branch of the tree.
 OT_DEF (GeneralBinarySpaceTree)
void Print () const
GeneralBinarySpaceTreeright () 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_
GeneralBinarySpaceTreeleft_
GeneralBinarySpaceTreeright_
Statistic stat_

Detailed Description

template<class TBound, class TDataset, class TStatistic = EmptyStatistic<TDataset>>
class GeneralBinarySpaceTree< TBound, TDataset, TStatistic >

A binary space partitioning tree, such as KD or ball tree.

This particular tree forbids you from having more children.

Parameters:
TBound the bounding type of each child (TODO explain interface)
TDataset the data set type
TStatistic extra data in the node
EXPERIMENTAL FEATURE.

Definition at line 60 of file general_spacetree.h.


Member Function Documentation

template<class TBound , class TDataset , class TStatistic = EmptyStatistic<TDataset>>
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.

template<class TBound , class TDataset , class TStatistic = EmptyStatistic<TDataset>>
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.

template<class TBound , class TDataset , class TStatistic = EmptyStatistic<TDataset>>
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.

template<class TBound , class TDataset , class TStatistic = EmptyStatistic<TDataset>>
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.

Parameters:
begin_q the begin() of the node to find
count_q the count() of the node to find
Returns:
the found node, or NULL

Definition at line 149 of file general_spacetree.h.

References GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().

template<class TBound , class TDataset , class TStatistic = EmptyStatistic<TDataset>>
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.

Parameters:
begin_q the begin() of the node to find
count_q the count() of the node to find
Returns:
the found node, or NULL

Definition at line 123 of file general_spacetree.h.

References GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().

Referenced by GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::FindByBeginCount().

template<class TBound , class TDataset , class TStatistic = EmptyStatistic<TDataset>>
GeneralBinarySpaceTree* GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::left (  )  const [inline]

Gets the left branch of the tree.

Definition at line 204 of file general_spacetree.h.

template<class TBound , class TDataset , class TStatistic = EmptyStatistic<TDataset>>
GeneralBinarySpaceTree* GeneralBinarySpaceTree< TBound, TDataset, TStatistic >::right (  )  const [inline]

Gets the right branch.

Definition at line 212 of file general_spacetree.h.

template<class TBound , class TDataset , class TStatistic = EmptyStatistic<TDataset>>
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.


The documentation for this class was generated from the following file:
Generated on Mon Jan 24 12:04:40 2011 for FASTlib by  doxygen 1.6.3