Jpp 20.0.0-rc.2
the software that should make you happy
|
Auxiliary data structure for running average, standard deviation and quantiles. More...
#include <JQuantile.hh>
Public Types | |
enum | Quantile_t { forward_t = +1 , symmetric_t = 0 , backward_t = -1 } |
Options for evaluation of quantile. More... | |
Public Member Functions | |
JQuantile (const JTitle &title="") | |
Constructor. | |
template<class JElement_t , class JAllocator_t > | |
JQuantile (const JTitle &title, const array_type< JElement_t, JAllocator_t > &buffer, const double w=1.0) | |
Constructor. | |
void | reset () |
Reset. | |
JQuantile & | add (const JQuantile &Q) |
Add quantile. | |
void | put (const double x, const double w=1.0) |
Put value. | |
template<class JElement_t , class JAllocator_t > | |
void | put (const array_type< JElement_t, JAllocator_t > &buffer, const double w=1.0) |
Put data. | |
double | getQuantile (const double Q, const Quantile_t option=forward_t) const |
Get quantile. | |
JStats & | add (const JStats &Q) |
Add stats. | |
long long int | getCount () const |
Get total count. | |
double | getTotal () const |
Get total weight. | |
double | getXmin () const |
Get minimum value. | |
double | getXmax () const |
Get maximum value. | |
double | getWmin () const |
Get minimum weight. | |
double | getWmax () const |
Get maximum weight. | |
double | getMean () const |
Get mean value. | |
double | getMean (const double value) const |
Get mean value. | |
double | getSTDev () const |
Get standard deviation. | |
double | getSTDev (const double value) const |
Get standard deviation. | |
double | getDeviation (const bool relative=true) const |
Get maximal deviation from average. | |
bool | hasAccuracy (const double precision) const |
Test relative accuracy. | |
std::ostream & | print (std::ostream &out, bool lpr=true) const |
Print stats. | |
const std::string & | getTitle () const |
Get title. | |
void | setTitle (const std::string &title) |
Set title. | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. | |
Static Protected Member Functions | |
template<class T > | |
static double | getQuantile (T __begin, T __end, const double W) |
Get quantile. | |
Protected Attributes | |
std::multimap< double, double > | buffer |
double | mean |
double | sigma |
double | total |
long long int | count |
double | xmin |
double | xmax |
double | wmin |
double | wmax |
std::string | title |
Auxiliary data structure for running average, standard deviation and quantiles.
Definition at line 38 of file JQuantile.hh.
Options for evaluation of quantile.
Enumerator | |
---|---|
forward_t | forward |
symmetric_t | symmatric |
backward_t | backward |
Definition at line 133 of file JQuantile.hh.
|
inline |
Constructor.
title | title |
Definition at line 47 of file JQuantile.hh.
|
inline |
Constructor.
title | title |
buffer | input data |
w | weight |
Definition at line 62 of file JQuantile.hh.
|
inline |
Reset.
Definition at line 76 of file JQuantile.hh.
Add quantile.
Q | quantile |
Definition at line 90 of file JQuantile.hh.
|
inline |
Put value.
x | value |
w | weight |
Definition at line 106 of file JQuantile.hh.
|
inline |
|
inline |
Get quantile.
Q | quantile |
option | option |
Definition at line 147 of file JQuantile.hh.
|
inlinestaticprotected |
Get quantile.
__begin | begin of data |
__end | end of data |
W | weight |
Definition at line 178 of file JQuantile.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Print stats.
out | output stream |
lpr | long print |
Definition at line 320 of file JStats.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
protected |
Definition at line 194 of file JQuantile.hh.