SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SpillDualTreeTraverser< MetricType, StatisticType, MatType, HyperplaneType, SplitType > Class Template Reference

A generic dual-tree traverser for hybrid spill trees; see spill_dual_tree_traverser.hpp for implementation. More...

Public Member Functions

 SpillDualTreeTraverser (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 (SpillTree &queryNode, SpillTree &referenceNode, const bool bruteForce=false)
 Traverse the two trees. More...

 

Detailed Description


template
<
typename
MetricType
,
typename
StatisticType
=
EmptyStatistic
,
typename
MatType
=
arma::mat
,
template
<
typename
HyperplaneMetricType
>
class
HyperplaneType
=
AxisOrthogonalHyperplane
,
template
<
typename
SplitMetricType
,
typename
SplitMatType
>
class
SplitType
=
MidpointSpaceSplit
>


template
<
typename
MetricType
,
typename
StatisticType
,
typename
MatType
,
template
<
typename
HyperplaneMetricType
>
class
HyperplaneType
,
template
<
typename
SplitMetricType
,
typename
SplitMatType
>
class
SplitType
>

class mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SpillDualTreeTraverser< MetricType, StatisticType, MatType, HyperplaneType, SplitType >

A generic dual-tree traverser for hybrid spill trees; see spill_dual_tree_traverser.hpp for implementation.

The Defeatist template parameter determines if the traverser must do defeatist search on overlapping nodes.

Definition at line 35 of file spill_dual_tree_traverser.hpp.

Constructor & Destructor Documentation

◆ SpillDualTreeTraverser()

SpillDualTreeTraverser ( RuleType &  rule)

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

Member Function Documentation

◆ NumBaseCases() [1/2]

size_t NumBaseCases ( ) const
inline

Get the number of times a base case was calculated.

Definition at line 72 of file spill_dual_tree_traverser.hpp.

◆ NumBaseCases() [2/2]

size_t& NumBaseCases ( )
inline

Modify the number of times a base case was calculated.

Definition at line 74 of file spill_dual_tree_traverser.hpp.

◆ NumPrunes() [1/2]

size_t NumPrunes ( ) const
inline

Get the number of prunes.

Definition at line 57 of file spill_dual_tree_traverser.hpp.

◆ NumPrunes() [2/2]

size_t& NumPrunes ( )
inline

Modify the number of prunes.

Definition at line 59 of file spill_dual_tree_traverser.hpp.

◆ NumScores() [1/2]

size_t NumScores ( ) const
inline

Get the number of times a node combination was scored.

Definition at line 67 of file spill_dual_tree_traverser.hpp.

◆ NumScores() [2/2]

size_t& NumScores ( )
inline

Modify the number of times a node combination was scored.

Definition at line 69 of file spill_dual_tree_traverser.hpp.

◆ NumVisited() [1/2]

size_t NumVisited ( ) const
inline

Get the number of visited combinations.

Definition at line 62 of file spill_dual_tree_traverser.hpp.

◆ NumVisited() [2/2]

size_t& NumVisited ( )
inline

Modify the number of visited combinations.

Definition at line 64 of file spill_dual_tree_traverser.hpp.

◆ Traverse()

void Traverse ( SpillTree queryNode,
SpillTree referenceNode,
const bool  bruteForce = false 
)

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.
bruteForceIf true, then do a brute-force search on the reference node instead of traversing any further.

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