mlpack  master
Public Member Functions | Private Attributes | List of all members
mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::SingleTreeTraverser< RuleType > Class Template Reference

A single-tree traverser for binary space trees; see single_tree_traverser.hpp for implementation. More...

Public Member Functions

 SingleTreeTraverser (RuleType &rule)
 Instantiate the single tree traverser with the given rule set. More...
 
size_t NumPrunes () const
 Get the number of prunes. More...
 
size_t & NumPrunes ()
 Modify the number of prunes. More...
 
void Traverse (const size_t queryIndex, BinarySpaceTree &referenceNode)
 Traverse the tree with the given point. More...
 

Private Attributes

size_t numPrunes
 The number of nodes which have been pruned during traversal. More...
 
RuleType & rule
 Reference to the rules with which the tree will be traversed. More...
 

Detailed Description

template<typename MetricType, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename BoundMetricType, typename... > class BoundType = bound::HRectBound, template< typename SplitBoundType, typename SplitMatType > class SplitType = MidpointSplit>
template<typename RuleType>
class mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::SingleTreeTraverser< RuleType >

A single-tree traverser for binary space trees; see single_tree_traverser.hpp for implementation.

Definition at line 96 of file binary_space_tree.hpp.

Constructor & Destructor Documentation

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename BoundMetricType, typename... > class BoundType = bound::HRectBound, template< typename SplitBoundType, typename SplitMatType > class SplitType = MidpointSplit>
template<typename RuleType >
mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::SingleTreeTraverser< RuleType >::SingleTreeTraverser ( RuleType &  rule)

Instantiate the single tree traverser with the given rule set.

Member Function Documentation

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename BoundMetricType, typename... > class BoundType = bound::HRectBound, template< typename SplitBoundType, typename SplitMatType > class SplitType = MidpointSplit>
template<typename RuleType >
size_t mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::SingleTreeTraverser< RuleType >::NumPrunes ( ) const
inline

Get the number of prunes.

Definition at line 50 of file single_tree_traverser.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename BoundMetricType, typename... > class BoundType = bound::HRectBound, template< typename SplitBoundType, typename SplitMatType > class SplitType = MidpointSplit>
template<typename RuleType >
size_t& mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::SingleTreeTraverser< RuleType >::NumPrunes ( )
inline

Modify the number of prunes.

Definition at line 52 of file single_tree_traverser.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename BoundMetricType, typename... > class BoundType = bound::HRectBound, template< typename SplitBoundType, typename SplitMatType > class SplitType = MidpointSplit>
template<typename RuleType >
void mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::SingleTreeTraverser< RuleType >::Traverse ( const size_t  queryIndex,
BinarySpaceTree referenceNode 
)

Traverse the tree with the given point.

Parameters
queryIndexThe index of the point in the query set which is being used as the query point.
referenceNodeThe tree node to be traversed.

Member Data Documentation

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename BoundMetricType, typename... > class BoundType = bound::HRectBound, template< typename SplitBoundType, typename SplitMatType > class SplitType = MidpointSplit>
template<typename RuleType >
size_t mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::SingleTreeTraverser< RuleType >::numPrunes
private

The number of nodes which have been pruned during traversal.

Definition at line 59 of file single_tree_traverser.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename BoundMetricType, typename... > class BoundType = bound::HRectBound, template< typename SplitBoundType, typename SplitMatType > class SplitType = MidpointSplit>
template<typename RuleType >
RuleType& mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::SingleTreeTraverser< RuleType >::rule
private

Reference to the rules with which the tree will be traversed.

Definition at line 56 of file single_tree_traverser.hpp.


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