1 #ifndef _theplu_yat_statistics_averagerpair_ 2 #define _theplu_yat_statistics_averagerpair_ 30 #include "yat/utility/iterator_traits.h" 32 #include <boost/concept_check.hpp> 33 #include <boost/iterator/iterator_concepts.hpp> 64 void add(
const double x,
const double y,
const long n=1);
73 double ccc(
void)
const;
101 double msd(
void)
const;
116 double sum_xy(
void)
const;
154 void xy_add(
double mx,
double my,
double xy_centered,
long n);
170 template <
class InputIterator1,
class InputIterator2>
172 InputIterator2 first2)
174 BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<InputIterator1>));
175 BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIterator<InputIterator1>));
176 BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<InputIterator2>));
177 BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIterator<InputIterator2>));
181 for ( ; first1 != last1; ++first1, ++first2)
182 ap.
add(*first1, *first2);
AveragerPair(void)
The default constructor.
Class to calculate simple (first and second moments) averages.
Definition: Averager.h:46
The Department of Theoretical Physics namespace as we define it.
double sum_squared_deviation(void) const
double sum_xy_centered(void) const
const AveragerPair & operator=(const AveragerPair &a)
The assigment operator.
void add(const double x, const double y, const long n=1)
double mean_xy(void) const
Class for taking care of mean and covariance of two variables.
Definition: AveragerPair.h:47
double covariance(void) const
const Averager & y_averager(void) const
double ccc(void) const
Concordence correlation coefficient.
void check_iterator_is_unweighted(Iter iter)
check (at compile time) that iterator is unweighted.
Definition: iterator_traits.h:200
double sum_xy(void) const
void reset(void)
Reset everything to zero.
double correlation(void) const
void add(AveragerPair &ap, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
adding data from two ranges to AveragerPair ap
Definition: AveragerPair.h:171
const Averager & x_averager(void) const
const AveragerPair & operator+=(const AveragerPair &)