MLPACK  1.0.4
Public Member Functions | Private Member Functions | Private Attributes
mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType > Class Template Reference

List of all members.

Public Member Functions

 DualTreeTraverser (RuleType &rule)
 Initialize the dual tree traverser with the given rule type.
size_t NumPrunes () const
 Get the number of pruned nodes.
size_t & NumPrunes ()
 Modify the number of pruned nodes.
void Traverse (CoverTree &queryNode, CoverTree &referenceNode)
 Traverse the two specified trees.
void Traverse (CoverTree &queryNode, std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &referenceMap)
 Helper function for traversal of the two trees.

Private Member Functions

void PruneMap (CoverTree &candidateQueryNode, std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &referenceMap, std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &childMap)
 Prepare map for recursion.
void PruneMapForSelfChild (CoverTree &candidateQueryNode, std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &referenceMap)
void ReferenceRecursion (CoverTree &queryNode, std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &referenceMap)

Private Attributes

size_t numPrunes
 The number of pruned nodes.
RuleType & rule
 The instantiated rule set for pruning branches.

Detailed Description

template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType>
class mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >

Definition at line 37 of file dual_tree_traverser.hpp.


Constructor & Destructor Documentation

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

Initialize the dual tree traverser with the given rule type.


Member Function Documentation

template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType >
size_t mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >::NumPrunes ( ) const [inline]

Get the number of pruned nodes.

Definition at line 62 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType >
size_t& mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >::NumPrunes ( ) [inline]

Modify the number of pruned nodes.

Definition at line 64 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType >
void mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >::PruneMap ( CoverTree candidateQueryNode,
std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &  referenceMap,
std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &  childMap 
) [private]

Prepare map for recursion.

template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType >
void mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >::PruneMapForSelfChild ( CoverTree candidateQueryNode,
std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &  referenceMap 
) [private]
template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType >
void mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >::ReferenceRecursion ( CoverTree queryNode,
std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &  referenceMap 
) [private]
template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType >
void mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >::Traverse ( CoverTree queryNode,
CoverTree referenceNode 
)

Traverse the two specified trees.

Parameters:
queryNodeRoot of query tree.
referenceNodeRoot of reference tree.
template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType >
void mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >::Traverse ( CoverTree queryNode,
std::map< int, std::vector< DualCoverTreeMapEntry< MetricType, RootPointPolicy, StatisticType > > > &  referenceMap 
)

Helper function for traversal of the two trees.


Member Data Documentation

template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType >
size_t mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >::numPrunes [private]

The number of pruned nodes.

Definition at line 71 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::LMetric<2, true>, typename RootPointPolicy = FirstPointIsRoot, typename StatisticType = EmptyStatistic>
template<typename RuleType >
RuleType& mlpack::tree::CoverTree< MetricType, RootPointPolicy, StatisticType >::DualTreeTraverser< RuleType >::rule [private]

The instantiated rule set for pruning branches.

Definition at line 68 of file dual_tree_traverser.hpp.


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