mlpack
Public Types | Public Member Functions | List of all members
mlpack::emst::DTBRules< MetricType, TreeType > Class Template Reference

Public Types

typedef tree::TraversalInfo< TreeType > TraversalInfoType
 

Public Member Functions

 DTBRules (const arma::mat &dataSet, UnionFind &connections, arma::vec &neighborsDistances, arma::Col< size_t > &neighborsInComponent, arma::Col< size_t > &neighborsOutComponent, MetricType &metric)
 
double BaseCase (const size_t queryIndex, const size_t referenceIndex)
 
double Score (const size_t queryIndex, TreeType &referenceNode)
 Get the score for recursion order. More...
 
double Rescore (const size_t queryIndex, TreeType &referenceNode, const double oldScore)
 Re-evaluate the score for recursion order. More...
 
double Score (TreeType &queryNode, TreeType &referenceNode)
 Get the score for recursion order. More...
 
double Rescore (TreeType &queryNode, TreeType &referenceNode, const double oldScore) const
 Re-evaluate the score for recursion order. More...
 
const TraversalInfoTypeTraversalInfo () const
 
TraversalInfoTypeTraversalInfo ()
 
size_t BaseCases () const
 Get the number of base cases performed.
 
size_t & BaseCases ()
 Modify the number of base cases performed.
 
size_t Scores () const
 Get the number of node combinations that have been scored.
 
size_t & Scores ()
 Modify the number of node combinations that have been scored.
 

Member Function Documentation

◆ Rescore() [1/2]

template<typename MetricType , typename TreeType >
double mlpack::emst::DTBRules< MetricType, TreeType >::Rescore ( const size_t  queryIndex,
TreeType &  referenceNode,
const double  oldScore 
)

Re-evaluate the score for recursion order.

A low score indicates priority for recursion, while DBL_MAX indicates that the node should not be recursed into at all (it should be pruned). This is used when the score has already been calculated, but another recursion may have modified the bounds for pruning. So the old score is checked against the new pruning bound.

Parameters
queryIndexIndex of query point.
referenceNodeCandidate node to be recursed into.
oldScoreOld score produced by Score() (or Rescore()).

◆ Rescore() [2/2]

template<typename MetricType , typename TreeType >
double mlpack::emst::DTBRules< MetricType, TreeType >::Rescore ( TreeType &  queryNode,
TreeType &  referenceNode,
const double  oldScore 
) const

Re-evaluate the score for recursion order.

A low score indicates priority for recursion, while DBL_MAX indicates that the node should not be recursed into at all (it should be pruned). This is used when the score has already been calculated, but another recursion may have modified the bounds for pruning. So the old score is checked against the new pruning bound.

Parameters
queryNodeCandidate query node to recurse into.
referenceNodeCandidate reference node to recurse into.
oldScoreOld score produced by Socre() (or Rescore()).

◆ Score() [1/2]

template<typename MetricType , typename TreeType >
double mlpack::emst::DTBRules< MetricType, TreeType >::Score ( const size_t  queryIndex,
TreeType &  referenceNode 
)

Get the score for recursion order.

A low score indicates priority for recursion, while DBL_MAX indicates that the node should not be recursed into at all (it should be pruned).

Parameters
queryIndexIndex of query point.
referenceNodeCandidate node to be recursed into.

◆ Score() [2/2]

template<typename MetricType , typename TreeType >
double mlpack::emst::DTBRules< MetricType, TreeType >::Score ( TreeType &  queryNode,
TreeType &  referenceNode 
)

Get the score for recursion order.

A low score indicates priority for recursionm while DBL_MAX indicates that the node should not be recursed into at all (it should be pruned).

Parameters
queryNodeCandidate query node to recurse into.
referenceNodeCandidate reference node to recurse into.

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