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

Public Types

typedef QueueFrame< BinarySpaceTree, typename RuleType::TraversalInfoType > QueueFrameType
 

Public Member Functions

 BreadthFirstDualTreeTraverser (RuleType &rule)
 Instantiate the dual-tree traverser with the given rule set. More...
 
size_t NumBaseCases () const
 Get the number of times a base case was calculated. More...
 
size_t & NumBaseCases ()
 Modify the number of times a base case was calculated. More...
 
size_t NumPrunes () const
 Get the number of prunes. More...
 
size_t & NumPrunes ()
 Modify the number of prunes. More...
 
size_t NumScores () const
 Get the number of times a node combination was scored. More...
 
size_t & NumScores ()
 Modify the number of times a node combination was scored. More...
 
size_t NumVisited () const
 Get the number of visited combinations. More...
 
size_t & NumVisited ()
 Modify the number of visited combinations. More...
 
void Traverse (BinarySpaceTree &queryNode, BinarySpaceTree &referenceNode)
 Traverse the two trees. More...
 
void Traverse (BinarySpaceTree &queryNode, std::priority_queue< QueueFrameType > &referenceQueue)
 

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 combination was scored. More...
 
size_t numVisited
 The number of node combinations that have been visited during traversal. More...
 
RuleType & rule
 Reference to the rules with which the trees will be traversed. More...
 
RuleType::TraversalInfoType traversalInfo
 Traversal information, held in the class so that it isn't continually being reallocated. 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 >::BreadthFirstDualTreeTraverser< RuleType >

Definition at line 103 of file binary_space_tree.hpp.

Member Typedef 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 >
typedef QueueFrame<BinarySpaceTree, typename RuleType::TraversalInfoType> mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::BreadthFirstDualTreeTraverser< RuleType >::QueueFrameType

Definition at line 53 of file breadth_first_dual_tree_traverser.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 >::BreadthFirstDualTreeTraverser< RuleType >::BreadthFirstDualTreeTraverser ( RuleType &  rule)

Instantiate the dual-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 >::BreadthFirstDualTreeTraverser< RuleType >::NumBaseCases ( ) const
inline

Get the number of times a base case was calculated.

Definition at line 83 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::NumBaseCases ( )
inline

Modify the number of times a base case was calculated.

Definition at line 85 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::NumPrunes ( ) const
inline

Get the number of prunes.

Definition at line 68 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::NumPrunes ( )
inline

Modify the number of prunes.

Definition at line 70 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::NumScores ( ) const
inline

Get the number of times a node combination was scored.

Definition at line 78 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::NumScores ( )
inline

Modify the number of times a node combination was scored.

Definition at line 80 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::NumVisited ( ) const
inline

Get the number of visited combinations.

Definition at line 73 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::NumVisited ( )
inline

Modify the number of visited combinations.

Definition at line 75 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::Traverse ( BinarySpaceTree queryNode,
BinarySpaceTree referenceNode 
)

Traverse the two trees.

This does not reset the number of prunes.

Parameters
queryNodeThe query node to be traversed.
referenceNodeThe reference node to be traversed.
scoreThe score of the current node combination.
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 >::BreadthFirstDualTreeTraverser< RuleType >::Traverse ( BinarySpaceTree queryNode,
std::priority_queue< QueueFrameType > &  referenceQueue 
)

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 >::BreadthFirstDualTreeTraverser< RuleType >::numBaseCases
private

The number of times a base case was calculated.

Definition at line 101 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::numPrunes
private

The number of prunes.

Definition at line 92 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::numScores
private

The number of times a node combination was scored.

Definition at line 98 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::numVisited
private

The number of node combinations that have been visited during traversal.

Definition at line 95 of file breadth_first_dual_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 >::BreadthFirstDualTreeTraverser< RuleType >::rule
private

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

Definition at line 89 of file breadth_first_dual_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::TraversalInfoType mlpack::tree::BinarySpaceTree< MetricType, StatisticType, MatType, BoundType, SplitType >::BreadthFirstDualTreeTraverser< RuleType >::traversalInfo
private

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

Definition at line 105 of file breadth_first_dual_tree_traverser.hpp.


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