mlpack  master
Classes | Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
mlpack::tree::RectangleTree< MetricType, StatisticType, MatType, SplitType, DescentType, AuxiliaryInformationType >::SingleTreeTraverser< RuleType > Class Template Reference

A single traverser for rectangle type trees. More...

Classes

struct  NodeAndScore
 

Public Member Functions

 SingleTreeTraverser (RuleType &rule)
 Instantiate the 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, const RectangleTree &referenceNode)
 Traverse the tree with the given point. More...
 

Static Private Member Functions

static bool NodeComparator (const NodeAndScore &obj1, const NodeAndScore &obj2)
 

Private Attributes

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

Detailed Description

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename SplitType = RTreeSplit, typename DescentType = RTreeDescentHeuristic, template< typename > class AuxiliaryInformationType = NoAuxiliaryInformation>
template<typename RuleType>
class mlpack::tree::RectangleTree< MetricType, StatisticType, MatType, SplitType, DescentType, AuxiliaryInformationType >::SingleTreeTraverser< RuleType >

A single traverser for rectangle type trees.

See single_tree_traverser.hpp for implementation.

Definition at line 111 of file rectangle_tree.hpp.

Constructor & Destructor Documentation

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename SplitType = RTreeSplit, typename DescentType = RTreeDescentHeuristic, template< typename > class AuxiliaryInformationType = NoAuxiliaryInformation>
template<typename RuleType >
mlpack::tree::RectangleTree< MetricType, StatisticType, MatType, SplitType, DescentType, AuxiliaryInformationType >::SingleTreeTraverser< RuleType >::SingleTreeTraverser ( RuleType &  rule)

Instantiate the traverser with the given rule set.

Member Function Documentation

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename SplitType = RTreeSplit, typename DescentType = RTreeDescentHeuristic, template< typename > class AuxiliaryInformationType = NoAuxiliaryInformation>
template<typename RuleType >
static bool mlpack::tree::RectangleTree< MetricType, StatisticType, MatType, SplitType, DescentType, AuxiliaryInformationType >::SingleTreeTraverser< RuleType >::NodeComparator ( const NodeAndScore obj1,
const NodeAndScore obj2 
)
inlinestaticprivate
template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename SplitType = RTreeSplit, typename DescentType = RTreeDescentHeuristic, template< typename > class AuxiliaryInformationType = NoAuxiliaryInformation>
template<typename RuleType >
size_t mlpack::tree::RectangleTree< MetricType, StatisticType, MatType, SplitType, DescentType, AuxiliaryInformationType >::SingleTreeTraverser< RuleType >::NumPrunes ( ) const
inline

Get the number of prunes.

Definition at line 50 of file single_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename SplitType = RTreeSplit, typename DescentType = RTreeDescentHeuristic, template< typename > class AuxiliaryInformationType = NoAuxiliaryInformation>
template<typename RuleType >
size_t& mlpack::tree::RectangleTree< MetricType, StatisticType, MatType, SplitType, DescentType, AuxiliaryInformationType >::SingleTreeTraverser< RuleType >::NumPrunes ( )
inline

Modify the number of prunes.

Definition at line 52 of file single_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename SplitType = RTreeSplit, typename DescentType = RTreeDescentHeuristic, template< typename > class AuxiliaryInformationType = NoAuxiliaryInformation>
template<typename RuleType >
void mlpack::tree::RectangleTree< MetricType, StatisticType, MatType, SplitType, DescentType, AuxiliaryInformationType >::SingleTreeTraverser< RuleType >::Traverse ( const size_t  queryIndex,
const RectangleTree 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 = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename SplitType = RTreeSplit, typename DescentType = RTreeDescentHeuristic, template< typename > class AuxiliaryInformationType = NoAuxiliaryInformation>
template<typename RuleType >
size_t mlpack::tree::RectangleTree< MetricType, StatisticType, MatType, SplitType, DescentType, AuxiliaryInformationType >::SingleTreeTraverser< RuleType >::numPrunes
private

The number of nodes which have been prenud during traversal.

Definition at line 73 of file single_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, typename SplitType = RTreeSplit, typename DescentType = RTreeDescentHeuristic, template< typename > class AuxiliaryInformationType = NoAuxiliaryInformation>
template<typename RuleType >
RuleType& mlpack::tree::RectangleTree< MetricType, StatisticType, MatType, SplitType, DescentType, AuxiliaryInformationType >::SingleTreeTraverser< RuleType >::rule
private

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

Definition at line 70 of file single_tree_traverser.hpp.


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