MLPACK  1.0.11
range_search_stat.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_METHODS_RANGE_SEARCH_RANGE_SEARCH_STAT_HPP
24 #define __MLPACK_METHODS_RANGE_SEARCH_RANGE_SEARCH_STAT_HPP
25 
26 #include <mlpack/core.hpp>
27 
28 namespace mlpack {
29 namespace range {
30 
37 {
38  public:
43 
48  template<typename TreeType>
49  RangeSearchStat(TreeType& /* node */) :
50  lastDistanceNode(NULL),
51  lastDistance(0.0) { }
52 
54  void* LastDistanceNode() const { return lastDistanceNode; }
56  void*& LastDistanceNode() { return lastDistanceNode; }
58  double LastDistance() const { return lastDistance; }
60  double& LastDistance() { return lastDistance; }
61 
62  private:
66  double lastDistance;
67 };
68 
69 }; // namespace neighbor
70 }; // namespace mlpack
71 
72 #endif
double & LastDistance()
Modify the last distance evaluation.
void * lastDistanceNode
The last distance evaluation node.
double lastDistance
The last distance evaluation.
double LastDistance() const
Get the last distance evaluation.
void *& LastDistanceNode()
Modify the last distance evaluation node.
RangeSearchStat(TreeType &)
Initialize the statistic given a tree node that this statistic belongs to.
Statistic class for RangeSearch, to be set to the StatisticType of the tree type that range search is...
void * LastDistanceNode() const
Get the last distance evaluation node.
RangeSearchStat()
Initialize the statistic.