Class describing a distributed statistical sample.
#include <DistributedSample.h>
Public Member Functions | |
DistributedSample () | |
void | insert (const real_t val) |
template<class InputIterator > | |
void | insert (InputIterator first, InputIterator last) |
template<typename T > | |
void | castToRealAndInsert (const T &val) |
template<class InputIterator > | |
void | castToRealAndInsert (InputIterator first, InputIterator last) |
void | clear () |
void | mpiAllGather () |
Combines the samples from all processes and stores the result on each process. More... | |
void | mpiGather (int rank) |
Combines the samples from all processes and stores the result on process 'rank'. More... | |
void | mpiGatherRoot () |
Combines the samples from all processes and stores the result on the root process. More... | |
real_t | sum () const |
real_t | min () const |
real_t | max () const |
real_t | range () const |
real_t | mean () const |
real_t | avg () const |
real_t | variance () const |
real_t | stdDeviation () const |
real_t | relativeStdDeviation () const |
uint_t | size () |
std::string | format (const std::string &formatString=DEFAULT_FORMAT_STRING) const |
Generates a string with attributes of the sample. More... | |
Private Attributes | |
std::vector< real_t > | data_ |
real_t | sum_ |
real_t | min_ |
real_t | max_ |
uint_t | size_ |
real_t | mean_ |
real_t | variance_ |
Static Private Attributes | |
static const std::string | DEFAULT_FORMAT_STRING |
|
inline |
|
inline |
void walberla::math::DistributedSample::castToRealAndInsert | ( | const T & | val | ) |
void walberla::math::DistributedSample::castToRealAndInsert | ( | InputIterator | first, |
InputIterator | last | ||
) |
|
inline |
std::string walberla::math::DistributedSample::format | ( | const std::string & | formatString = DEFAULT_FORMAT_STRING | ) | const |
Generates a string with attributes of the sample.
The following patters are replaced in the format string:
min by min() max by max() sum by sum() mean by mean() var by variance() stddev by stdDeviation() relstddev by relativeStdDeviation() size by size()
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void walberla::math::DistributedSample::mpiAllGather | ( | ) |
Combines the samples from all processes and stores the result on each process.
Note that this is a collective MPI operation. It has to be called by all processes!
void walberla::math::DistributedSample::mpiGather | ( | int | rank | ) |
Combines the samples from all processes and stores the result on process 'rank'.
Note that this is a collective MPI operation. It has to be called by all processes!
rank | The rank of the process the combined sample is stored on. |
void walberla::math::DistributedSample::mpiGatherRoot | ( | ) |
Combines the samples from all processes and stores the result on the root process.
Note that this is a collective MPI operation. It has to be called by all processes!
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |