Class for taking care of mean and covariance of two variables in a weighted manner.
More...
Public Member Functions |
| AveragerPairWeighted (void) |
| The default constructor.
|
void | add (const double x, const double y, const double wx, const double wy) |
double | correlation (void) const |
| Pearson correlation coefficient.
|
double | covariance (void) const |
double | msd (void) const |
double | n (void) const |
void | reset (void) |
| Reset everything to zero.
|
double | sum_w (void) const |
double | sum_xy (void) const |
double | sum_xy_centered (void) const |
const AveragerWeighted & | x_averager (void) const |
const AveragerWeighted & | y_averager (void) const |
const AveragerPairWeighted & | operator+= (const AveragerPairWeighted &) |
| Addition assignment operator.
|
Related Functions |
(Note that these are not member functions.)
|
template<class InputIterator1 , class InputIterator2 > |
void | add (AveragerPairWeighted &ap, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
| adding a ranges of values to AveragerPairWeighted ap
|
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename InputIterator4 > |
void | add (AveragerPairWeighted &ap, InputIterator1 x, InputIterator1 xlast, InputIterator2 y, InputIterator3 wx, InputIterator4 wy) |
| adding four ranges of values to AveragerPairWeighted ap
|
Class for taking care of mean and covariance of two variables in a weighted manner.
- See also:
- Weighted Statistics
If nothing else stated, each function fulfills the following:
-
Setting a weight to zero corresponds to removing the data point from the dataset.
-
Setting all weights to unity, the yields the same result as from corresponding function in AveragerPair.
-
Rescaling weights does not change the performance of the object.
- See also:
- Averager AveragerWeighted AveragerPair