BinarySpaceTree< TBound, TDataset, TStatistic > Class Template Reference

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

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

List of all members.

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.
BinarySpaceTreeFindByBeginCount (index_t begin_q, index_t count_q)
 Find a node in this tree by its begin and count (const).
const BinarySpaceTreeFindByBeginCount (index_t begin_q, index_t count_q) const
 Find a node in this tree by its begin and count.
BinarySpaceTreeFindByBeginCount (index_t begin_q, index_t count_q)
 Find a node in this tree by its begin and count (const).
const BinarySpaceTreeFindByBeginCount (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
BinarySpaceTreeleft () const
 Gets the left branch of the tree.
BinarySpaceTreeleft () const
 Gets the left branch of the tree.
void Print () const
void Print () const
BinarySpaceTreeright () const
 Gets the right branch.
BinarySpaceTreeright () 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

Detailed Description

template<class TBound, class TDataset, class TStatistic = EmptyStatistic<TDataset>>
class BinarySpaceTree< 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 61 of file spacetree.h.


Member Function Documentation

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

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

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

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

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

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

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

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 150 of file spacetree.h.

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

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

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 124 of file spacetree.h.

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

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

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 150 of file spacetree.h.

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

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

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 124 of file spacetree.h.

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

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

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

Gets the left branch of the tree.

Definition at line 207 of file spacetree.h.

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

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

Gets the right branch.

Definition at line 215 of file spacetree.h.

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

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

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


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