|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57333 - sandbox/statistics/non_parametric/boost/statistics/detail/non_parametric/kolmogorov_smirnov
From: erwann.rogard_at_[hidden]
Date: 2009-11-03 12:01:43
Author: e_r
Date: 2009-11-03 12:01:42 EST (Tue, 03 Nov 2009)
New Revision: 57333
URL: http://svn.boost.org/trac/boost/changeset/57333
Log:
m
Text files modified:
sandbox/statistics/non_parametric/boost/statistics/detail/non_parametric/kolmogorov_smirnov/statistic.hpp | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
Modified: sandbox/statistics/non_parametric/boost/statistics/detail/non_parametric/kolmogorov_smirnov/statistic.hpp
==============================================================================
--- sandbox/statistics/non_parametric/boost/statistics/detail/non_parametric/kolmogorov_smirnov/statistic.hpp (original)
+++ sandbox/statistics/non_parametric/boost/statistics/detail/non_parametric/kolmogorov_smirnov/statistic.hpp 2009-11-03 12:01:42 EST (Tue, 03 Nov 2009)
@@ -57,7 +57,8 @@
);
while(b<e){
- val_ ecdf = static_cast<val_>(i)/static_cast<val_>(this->n());
+ val_ ecdf = static_cast<val_>(i);
+ ecdf /= static_cast<val_>(this->count());
val_ cdf = boost::fusion::at_key<key2_>(*b);
val_ m2 = (cdf > ecdf)?(cdf - ecdf) : (ecdf - cdf);
if(m2 > m1){ m1 = m2; }
@@ -68,8 +69,8 @@
return m1;
}
- const size_type& n()const{ return this->n_; }
- const result_type s()const{ return this->s_; }
+ const size_type& count()const{ return this->n_; }
+ const result_type value()const{ return this->s_; }
static const str_ description_header;
str_ description()const
@@ -77,7 +78,7 @@
return (
boost::format(
"(%1%,%2%)"
- )%this->n()%this->s()
+ )%this->count()%this->value()
).str();
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk