mlpack  master
Public Member Functions | Private Attributes | List of all members
mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType > Class Template Reference

A dual-tree traverser; see dual_tree_traverser.hpp. More...

Public Member Functions

 DualTreeTraverser (RuleType &rule)
 Instantiate the given dual-tree traverser with the given rule set. More...
 
size_t NumBaseCases () const
 Get the number of times a base case was computed. More...
 
size_t & NumBaseCases ()
 Modify the number of times a base case was computed. More...
 
size_t NumPrunes () const
 Get the number of pruned nodes. More...
 
size_t & NumPrunes ()
 Modify the number of pruned nodes (i.e. to reset it). More...
 
size_t NumScores () const
 Get the number of times a node was scored. More...
 
size_t & NumScores ()
 Modify the number of times a node was scored. More...
 
size_t NumVisited () const
 Get the number of visited node combinations. More...
 
size_t & NumVistied ()
 Modify the number of visited node combinations. More...
 
void Traverse (Octree &queryNode, Octree &referenceNode)
 Traverse the two trees. More...
 

Private Attributes

size_t numBaseCases
 The number of times a base case was calculated. More...
 
size_t numPrunes
 The number of prunes. More...
 
size_t numScores
 The number of times a node was scored. More...
 
size_t numVisited
 The number of visited node combinations. More...
 
RuleType & rule
 The rule type to use. More...
 
RuleType::TraversalInfoType traversalInfo
 Traversal information, held in the class so that it isn't continually being reallocated. More...
 

Detailed Description

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType, typename StatisticType, typename MatType>
class mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >

A dual-tree traverser; see dual_tree_traverser.hpp.

Definition at line 25 of file dual_tree_traverser.hpp.

Constructor & Destructor Documentation

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::DualTreeTraverser ( RuleType &  rule)

Instantiate the given dual-tree traverser with the given rule set.

Member Function Documentation

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::NumBaseCases ( ) const
inline

Get the number of times a base case was computed.

Definition at line 55 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t& mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::NumBaseCases ( )
inline

Modify the number of times a base case was computed.

Definition at line 57 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::NumPrunes ( ) const
inline

Get the number of pruned nodes.

Definition at line 40 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t& mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::NumPrunes ( )
inline

Modify the number of pruned nodes (i.e. to reset it).

Definition at line 42 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::NumScores ( ) const
inline

Get the number of times a node was scored.

Definition at line 50 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t& mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::NumScores ( )
inline

Modify the number of times a node was scored.

Definition at line 52 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::NumVisited ( ) const
inline

Get the number of visited node combinations.

Definition at line 45 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t& mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::NumVistied ( )
inline

Modify the number of visited node combinations.

Definition at line 47 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
void mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::Traverse ( Octree queryNode,
Octree referenceNode 
)

Traverse the two trees.

This does not reset the statistics of the traversals (it just adds to them).

Member Data Documentation

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::numBaseCases
private

The number of times a base case was calculated.

Definition at line 70 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::numPrunes
private

The number of prunes.

Definition at line 64 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::numScores
private

The number of times a node was scored.

Definition at line 68 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
size_t mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::numVisited
private

The number of visited node combinations.

Definition at line 66 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
RuleType& mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::rule
private

The rule type to use.

Definition at line 61 of file dual_tree_traverser.hpp.

template<typename MetricType = metric::EuclideanDistance, typename StatisticType = EmptyStatistic, typename MatType = arma::mat>
template<typename MetricType , typename StatisticType , typename MatType >
RuleType::TraversalInfoType mlpack::tree::Octree< MetricType, StatisticType, MatType >::DualTreeTraverser< MetricType, StatisticType, MatType >::traversalInfo
private

Traversal information, held in the class so that it isn't continually being reallocated.

Definition at line 74 of file dual_tree_traverser.hpp.


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