mlpack: a scalable c++ machine learning library
mlpack  2.0.2
mlpack::neighbor::NeighborSearchStat< SortPolicy > Class Template Reference

Extra data for each node in the tree. More...

Inheritance diagram for mlpack::neighbor::NeighborSearchStat< SortPolicy >:

Public Member Functions

 NeighborSearchStat ()
 Initialize the statistic with the worst possible distance according to our sorting policy. More...

 
template
<
typename
TreeType
>
 NeighborSearchStat (TreeType &)
 Initialization for a fully initialized node. More...

 
double AuxBound () const
 Get the aux bound. More...

 
double & AuxBound ()
 Modify the aux bound. More...

 
double FirstBound () const
 Get the first bound. More...

 
double & FirstBound ()
 Modify the first bound. More...

 
double LastDistance () const
 Get the last distance calculation. More...

 
double & LastDistance ()
 Modify the last distance calculation. More...

 
void Reset ()
 Reset statistic parameters to initial values. More...

 
double SecondBound () const
 Get the second bound. More...

 
double & SecondBound ()
 Modify the second bound. More...

 
template
<
typename
Archive
>
void Serialize (Archive &ar, const unsigned int)
 Serialize the statistic to/from an archive. More...

 

Private Attributes

double auxBound
 The aux bound on the node's neighbor distances (B_aux). More...

 
double firstBound
 The first bound on the node's neighbor distances (B_1). More...

 
double lastDistance
 The last distance evaluation. More...

 
double secondBound
 The second bound on the node's neighbor distances (B_2). More...

 

Detailed Description


template
<
typename
SortPolicy
>

class mlpack::neighbor::NeighborSearchStat< SortPolicy >

Extra data for each node in the tree.

For neighbor searches, each node only needs to store a bound on neighbor distances.

Definition at line 28 of file neighbor_search_stat.hpp.

Constructor & Destructor Documentation

◆ NeighborSearchStat() [1/2]

template
<
typename
SortPolicy
>
mlpack::neighbor::NeighborSearchStat< SortPolicy >::NeighborSearchStat ( )
inline

Initialize the statistic with the worst possible distance according to our sorting policy.

Definition at line 50 of file neighbor_search_stat.hpp.

◆ NeighborSearchStat() [2/2]

template
<
typename
SortPolicy
>
template
<
typename
TreeType
>
mlpack::neighbor::NeighborSearchStat< SortPolicy >::NeighborSearchStat ( TreeType &  )
inline

Initialization for a fully initialized node.

In this case, we don't need to worry about the node.

Definition at line 61 of file neighbor_search_stat.hpp.

Member Function Documentation

◆ AuxBound() [1/2]

template
<
typename
SortPolicy
>
double mlpack::neighbor::NeighborSearchStat< SortPolicy >::AuxBound ( ) const
inline

Get the aux bound.

Definition at line 87 of file neighbor_search_stat.hpp.

◆ AuxBound() [2/2]

template
<
typename
SortPolicy
>
double& mlpack::neighbor::NeighborSearchStat< SortPolicy >::AuxBound ( )
inline

Modify the aux bound.

Definition at line 89 of file neighbor_search_stat.hpp.

◆ FirstBound() [1/2]

template
<
typename
SortPolicy
>
double mlpack::neighbor::NeighborSearchStat< SortPolicy >::FirstBound ( ) const
inline

Get the first bound.

Definition at line 79 of file neighbor_search_stat.hpp.

◆ FirstBound() [2/2]

template
<
typename
SortPolicy
>
double& mlpack::neighbor::NeighborSearchStat< SortPolicy >::FirstBound ( )
inline

Modify the first bound.

Definition at line 81 of file neighbor_search_stat.hpp.

◆ LastDistance() [1/2]

template
<
typename
SortPolicy
>
double mlpack::neighbor::NeighborSearchStat< SortPolicy >::LastDistance ( ) const
inline

Get the last distance calculation.

Definition at line 91 of file neighbor_search_stat.hpp.

◆ LastDistance() [2/2]

template
<
typename
SortPolicy
>
double& mlpack::neighbor::NeighborSearchStat< SortPolicy >::LastDistance ( )
inline

Modify the last distance calculation.

Definition at line 93 of file neighbor_search_stat.hpp.

◆ Reset()

template
<
typename
SortPolicy
>
void mlpack::neighbor::NeighborSearchStat< SortPolicy >::Reset ( )
inline

Reset statistic parameters to initial values.

Definition at line 70 of file neighbor_search_stat.hpp.

◆ SecondBound() [1/2]

template
<
typename
SortPolicy
>
double mlpack::neighbor::NeighborSearchStat< SortPolicy >::SecondBound ( ) const
inline

Get the second bound.

Definition at line 83 of file neighbor_search_stat.hpp.

◆ SecondBound() [2/2]

template
<
typename
SortPolicy
>
double& mlpack::neighbor::NeighborSearchStat< SortPolicy >::SecondBound ( )
inline

Modify the second bound.

Definition at line 85 of file neighbor_search_stat.hpp.

◆ Serialize()

template
<
typename
SortPolicy
>
template
<
typename
Archive
>
void mlpack::neighbor::NeighborSearchStat< SortPolicy >::Serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serialize the statistic to/from an archive.

Definition at line 97 of file neighbor_search_stat.hpp.

Member Data Documentation

◆ auxBound

template
<
typename
SortPolicy
>
double mlpack::neighbor::NeighborSearchStat< SortPolicy >::auxBound
private

The aux bound on the node's neighbor distances (B_aux).

This represents the best descendant candidate distance (used to calculate secondBound).

Definition at line 41 of file neighbor_search_stat.hpp.

Referenced by mlpack::neighbor::NeighborSearchStat< neighbor::NearestNeighborSort >::AuxBound().

◆ firstBound

template
<
typename
SortPolicy
>
double mlpack::neighbor::NeighborSearchStat< SortPolicy >::firstBound
private

The first bound on the node's neighbor distances (B_1).

This represents the worst candidate distance of any descendants of this node.

Definition at line 33 of file neighbor_search_stat.hpp.

Referenced by mlpack::neighbor::NeighborSearchStat< neighbor::NearestNeighborSort >::FirstBound().

◆ lastDistance

template
<
typename
SortPolicy
>
double mlpack::neighbor::NeighborSearchStat< SortPolicy >::lastDistance
private

The last distance evaluation.

Definition at line 43 of file neighbor_search_stat.hpp.

Referenced by mlpack::neighbor::NeighborSearchStat< neighbor::NearestNeighborSort >::LastDistance().

◆ secondBound

template
<
typename
SortPolicy
>
double mlpack::neighbor::NeighborSearchStat< SortPolicy >::secondBound
private

The second bound on the node's neighbor distances (B_2).

This represents a bound on the worst distance of any descendants of this node assembled using the best descendant candidate distance modified by the furthest descendant distance.

Definition at line 38 of file neighbor_search_stat.hpp.

Referenced by mlpack::neighbor::NeighborSearchStat< neighbor::NearestNeighborSort >::SecondBound().


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