yat
0.11.3pre
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
yat
statistics
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
46
class
KolmogorovSmirnovOneSample
47
{
48
public
:
52
KolmogorovSmirnovOneSample
(
void
);
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&,
110
const
KolmogorovSmirnovOneSample
&);
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
Generated on Sat May 24 2014 03:33:05 for yat by
1.8.2