MLPACK  1.0.8
mrkd_statistic.hpp
Go to the documentation of this file.
1 
22 #ifndef __MLPACK_CORE_TREE_MRKD_STATISTIC_HPP
23 #define __MLPACK_CORE_TREE_MRKD_STATISTIC_HPP
24 
25 #include <mlpack/core.hpp>
26 
27 namespace mlpack {
28 namespace tree {
29 
34 {
35  public:
37  MRKDStatistic();
38 
44  template<typename TreeType>
45  MRKDStatistic(const TreeType& /* node */);
46 
50  std::string ToString() const;
51 
53  size_t Begin() const { return begin; }
55  size_t& Begin() { return begin; }
56 
58  size_t Count() const { return count; }
60  size_t& Count() { return count; }
61 
63  const arma::colvec& CenterOfMass() const { return centerOfMass; }
65  arma::colvec& CenterOfMass() { return centerOfMass; }
66 
68  size_t DominatingCentroid() const { return dominatingCentroid; }
70  size_t& DominatingCentroid() { return dominatingCentroid; }
71 
73  const std::vector<size_t>& Whitelist() const { return whitelist; }
75  std::vector<size_t>& Whitelist() { return whitelist; }
76 
77  private:
79  const arma::mat* dataset;
81  size_t begin;
83  size_t count;
90 
91  // Computed statistics.
93  arma::colvec centerOfMass;
96 
97  // There may be a better place to store this -- HRectBound?
100 
102  std::vector<size_t> whitelist;
105 };
106 
107 }; // namespace tree
108 }; // namespace mlpack
109 
110 // Include implementation.
111 #include "mrkd_statistic_impl.hpp"
112 
113 #endif // __MLPACK_CORE_TREE_MRKD_STATISTIC_HPP