yat  0.14.5pre
Spearman.h
1 #ifndef _theplu_yat_statistics_spearman_
2 #define _theplu_yat_statistics_spearman_
3 
4 // $Id: Spearman.h 2654 2011-11-15 19:36:37Z peter $
5 
6 /*
7  Copyright (C) 2011 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 <cstddef>
26 
27 namespace theplu {
28 namespace yat {
29 namespace statistics {
30 
39  class Spearman
40  {
41  public:
45  Spearman(void);
46 
50  virtual ~Spearman(void);
51 
55  void add(double x, double y);
56 
62  size_t n(void) const;
63 
73  double p_left(bool exact=false) const;
74 
92  double p_right(bool exact=false) const;
93 
103  double p_value(bool exact=false) const;
104 
108  void reset(void);
109 
119  double score(void) const;
120 
121  private:
122  class Pimpl;
123  Pimpl* pimpl_;
124 
125  // Copy not allowed
126  Spearman(const Spearman& other);
127  Spearman& operator=(const Spearman&);
128  };
129 
130 }}} // of namespace statistics, yat, and theplu
131 #endif
void reset(void)
reset to empty
double score(void) const
spearman rank correlation coefficient
double p_left(bool exact=false) const
Lower one-sided p-value.
double p_right(bool exact=false) const
Upper one-sided p-value.
double p_value(bool exact=false) const
Two-sided p-value.
void add(double x, double y)
add pair of data
size_t n(void) const
Number of data points.
virtual ~Spearman(void)
Destructor.
Spearman rank correlation coefficient.
Definition: Spearman.h:39

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5