mlpack  1.0.12
ra_query_stat.hpp
Go to the documentation of this file.
1 
15 #ifndef __MLPACK_METHODS_RANN_RA_QUERY_STAT_HPP
16 #define __MLPACK_METHODS_RANN_RA_QUERY_STAT_HPP
17 
18 #include <mlpack/core.hpp>
19 
21 
24 
25 namespace mlpack {
26 namespace neighbor {
27 
36 template<typename SortPolicy>
37 class RAQueryStat
38 {
39  public:
44  RAQueryStat() : bound(SortPolicy::WorstDistance()), numSamplesMade(0) { }
45 
49  template<typename TreeType>
50  RAQueryStat(const TreeType& /* node */) :
51  bound(SortPolicy::WorstDistance()),
52  numSamplesMade(0)
53  { }
54 
56  double Bound() const { return bound; }
58  double& Bound() { return bound; }
59 
61  size_t NumSamplesMade() const { return numSamplesMade; }
63  size_t& NumSamplesMade() { return numSamplesMade; }
64 
65  private:
67  double bound;
68 
70  size_t numSamplesMade;
71 
72 };
73 
74 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:23