mlpack  2.0.1
Public Member Functions | Private Attributes | List of all members
mlpack::tree::CoverTree< MetricType, StatisticType, MatType, RootPointPolicy >:: SingleTreeTraverser< RuleType > Class Template Reference

Public Member Functions

size_t NumPrunes () const
 Get the number of prunes so far. More...
 
size_t & NumPrunes ()
 Set the number of prunes (good for a reset to 0). More...
 
 SingleTreeTraverser (RuleType &rule)
 Initialize the single tree traverser with the given rule. More...
 
void Traverse (const size_t queryIndex, CoverTree &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 = metric::LMetric<2, true>, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename RootPointPolicy = FirstPointIsRoot>
template<typename RuleType>
class mlpack::tree::CoverTree< MetricType, StatisticType, MatType, RootPointPolicy >:: SingleTreeTraverser< RuleType >

Definition at line 33 of file single_tree_traverser.hpp.

Member Function Documentation

template<typename MetricType = metric::LMetric<2, true>, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename RootPointPolicy = FirstPointIsRoot>
template<typename RuleType >
size_t mlpack::tree::CoverTree< MetricType, StatisticType, MatType, RootPointPolicy >:: SingleTreeTraverser< RuleType >::NumPrunes ( ) const
inline

Get the number of prunes so far.

Definition at line 52 of file single_tree_traverser.hpp.

template<typename MetricType = metric::LMetric<2, true>, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename RootPointPolicy = FirstPointIsRoot>
template<typename RuleType >
size_t& mlpack::tree::CoverTree< MetricType, StatisticType, MatType, RootPointPolicy >:: SingleTreeTraverser< RuleType >::NumPrunes ( )
inline

Set the number of prunes (good for a reset to 0).

Definition at line 54 of file single_tree_traverser.hpp.

template<typename MetricType = metric::LMetric<2, true>, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename RootPointPolicy = FirstPointIsRoot>
template<typename RuleType >
mlpack::tree::CoverTree< MetricType, StatisticType, MatType, RootPointPolicy >:: SingleTreeTraverser< RuleType >::SingleTreeTraverser ( RuleType &  rule)

Initialize the single tree traverser with the given rule.

template<typename MetricType = metric::LMetric<2, true>, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename RootPointPolicy = FirstPointIsRoot>
template<typename RuleType >
void mlpack::tree::CoverTree< MetricType, StatisticType, MatType, RootPointPolicy >:: SingleTreeTraverser< RuleType >::Traverse ( const size_t  queryIndex,
CoverTree referenceNode 
)

Traverse the tree with the given point.

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

Member Data Documentation

template<typename MetricType = metric::LMetric<2, true>, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename RootPointPolicy = FirstPointIsRoot>
template<typename RuleType >
size_t mlpack::tree::CoverTree< MetricType, StatisticType, MatType, RootPointPolicy >:: SingleTreeTraverser< RuleType >::numPrunes
private

The number of nodes which have been pruned during traversal.

Definition at line 61 of file single_tree_traverser.hpp.

template<typename MetricType = metric::LMetric<2, true>, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename RootPointPolicy = FirstPointIsRoot>
template<typename RuleType >
RuleType& mlpack::tree::CoverTree< MetricType, StatisticType, MatType, RootPointPolicy >:: SingleTreeTraverser< RuleType >::rule
private

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

Definition at line 58 of file single_tree_traverser.hpp.


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