yat  0.13.2pre
KolmogorovSmirnovOneSample.h
1 #ifndef theplu_yat_statistics_kolmogorov_smirnov_one_sample
2 #define theplu_yat_statistics_kolmogorov_smirnov_one_sample
3 
4 // $Id: KolmogorovSmirnovOneSample.h 3001 2013-03-19 00:22:58Z peter $
5 
6 /*
7  Copyright (C) 2013 Peter Johansson
8 
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10 
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15 
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
25 #include <iosfwd>
26 
27 #include <map>
28 
29 namespace theplu {
30 namespace yat {
31 namespace statistics {
32 
47  {
48  public:
53 
59  void add(double value, double weight=1.0);
60 
70  double p_value(void) const;
71 
78  void remove(double value, double weight=1.0);
79 
83  void reset(void);
84 
92  double score(void) const;
93 
101  double signed_score(void) const;
102 
103  private:
104  mutable double score_;
105  mutable bool cached_;
106  std::multimap<double, double> data_;
107  double sum_w_;
108 
109  friend std::ostream& operator<<(std::ostream&,
111 
112  // using compiler generated copy and assignment
113  //KolmogorovSmirnovOneSample(const KolmogorovSmirnovOneSample&);
114  //KolmogorovSmirnovOneSample& operator=(const KolmogorovSmirnovOneSample&);
115  };
116 
117 }}} // of namespace theplu yat statistics
118 
119 #endif
double p_value(void) const
Large-Sample Approximation.
double score(void) const
Kolmogorov Smirnov statistic.
void reset(void)
resets everything to zero
void add(double value, double weight=1.0)
add a value
Kolmogorov Smirnov Test for one class.
Definition: KolmogorovSmirnovOneSample.h:46

Generated on Wed Jan 4 2017 02:23:07 for yat by  doxygen 1.8.5