MLPACK  1.0.10
ra_query_stat.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_METHODS_RANN_RA_QUERY_STAT_HPP
24 #define __MLPACK_METHODS_RANN_RA_QUERY_STAT_HPP
25 
26 #include <mlpack/core.hpp>
27 
29 
32 
33 namespace mlpack {
34 namespace neighbor {
35 
44 template<typename SortPolicy>
45 class RAQueryStat
46 {
47  public:
52  RAQueryStat() : bound(SortPolicy::WorstDistance()), numSamplesMade(0) { }
53 
57  template<typename TreeType>
58  RAQueryStat(const TreeType& /* node */) :
59  bound(SortPolicy::WorstDistance()),
60  numSamplesMade(0)
61  { }
62 
64  double Bound() const { return bound; }
66  double& Bound() { return bound; }
67 
69  size_t NumSamplesMade() const { return numSamplesMade; }
71  size_t& NumSamplesMade() { return numSamplesMade; }
72 
73  private:
75  double bound;
76 
78  size_t numSamplesMade;
79 
80 };
81 
82 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:31