13 #ifndef MLPACK_METHODS_NEIGHBOR_SEARCH_NEIGHBOR_SEARCH_STAT_HPP
14 #define MLPACK_METHODS_NEIGHBOR_SEARCH_NEIGHBOR_SEARCH_STAT_HPP
25 template<
typename SortPolicy>
49 firstBound(SortPolicy::WorstDistance()),
50 secondBound(SortPolicy::WorstDistance()),
51 auxBound(SortPolicy::WorstDistance()),
58 template<
typename TreeType>
60 firstBound(SortPolicy::WorstDistance()),
61 secondBound(SortPolicy::WorstDistance()),
62 auxBound(SortPolicy::WorstDistance()),
70 firstBound = SortPolicy::WorstDistance();
71 secondBound = SortPolicy::WorstDistance();
72 auxBound = SortPolicy::WorstDistance();
94 template<
typename Archive>
100 ar &
CreateNVP(secondBound,
"secondBound");
102 ar &
CreateNVP(lastDistance,
"lastDistance");
double AuxBound() const
Get the aux bound.
double & FirstBound()
Modify the first bound.
double & SecondBound()
Modify the second bound.
FirstShim< T > CreateNVP(T &t, const std::string &name, typename boost::enable_if< HasSerialize< T >>::type *=0)
Call this function to produce a name-value pair; this is similar to BOOST_SERIALIZATION_NVP(), but should be used for types that have a Serialize() function (or contain a type that has a Serialize() function) instead of a serialize() function.
double & AuxBound()
Modify the aux bound.
Extra data for each node in the tree.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Serialize(Archive &ar, const unsigned int)
Serialize the statistic to/from an archive.
double LastDistance() const
Get the last distance calculation.
double & LastDistance()
Modify the last distance calculation.
void Reset()
Reset statistic parameters to initial values.
double SecondBound() const
Get the second bound.
NeighborSearchStat(TreeType &)
Initialization for a fully initialized node.
NeighborSearchStat()
Initialize the statistic with the worst possible distance according to our sorting policy...
double FirstBound() const
Get the first bound.