|
Jpp 20.0.0-rc.8
the software that should make you happy
|
Auxiliary container for statistical analysis of a large number of positive (or zero) values. More...
#include <JGarage.hh>
Public Types | |
| typedef std::vector< std::vector< T > > | map_type |
| typedef map_type::value_type | value_type |
| typedef map_type::const_iterator | const_iterator |
| typedef map_type::const_reverse_iterator | const_reverse_iterator |
Public Member Functions | |
| size_t | getN () const |
| Get total number of values. | |
| T | getMin () const |
| Get minimal value. | |
| T | getMax () const |
| Get maximal value. | |
| void | put (const T value) |
| Add value to container. | |
| template<class JFunction_t > | |
| void | put (const size_t N, const JFunction_t &object) |
| Add values to container. | |
| template<class JFunction_t > | |
| void | operator() (const JFunction_t &object) const |
| For-each method. | |
| T | getValue (const double P) const |
| Get minimal value corresponding given maximal probability. | |
| double | getProbability (const T value) const |
| Get maximal probability corresponding given minimal value. | |
Static Public Member Functions | |
| static size_t | getKey (const T value) |
| Get hash key corresponding to given value. | |
Auxiliary container for statistical analysis of a large number of positive (or zero) values.
The data are organised in groups according to a numerical hash key so that the computation involving quantiles can be made faster.
The numerical hash key is obtained by multiplying the input value with the given factor and then taking the integer value of the result.
The computed quantiles correspond to a distribution with ascending values.
Definition at line 28 of file JGarage.hh.
| std::vector< std::vector<T> > JASTRONOMY::JGarage< T, factor >::map_type |
Definition at line 31 of file JGarage.hh.
| map_type::value_type JASTRONOMY::JGarage< T, factor >::value_type |
Definition at line 32 of file JGarage.hh.
| map_type::const_iterator JASTRONOMY::JGarage< T, factor >::const_iterator |
Definition at line 33 of file JGarage.hh.
| map_type::const_reverse_iterator JASTRONOMY::JGarage< T, factor >::const_reverse_iterator |
Definition at line 34 of file JGarage.hh.
|
inline |
Get total number of values.
Definition at line 42 of file JGarage.hh.
|
inline |
Get minimal value.
Definition at line 55 of file JGarage.hh.
|
inline |
Get maximal value.
Definition at line 74 of file JGarage.hh.
|
inlinestatic |
Get hash key corresponding to given value.
| value | value |
Definition at line 94 of file JGarage.hh.
|
inline |
Add value to container.
| value | value |
Definition at line 105 of file JGarage.hh.
|
inline |
Add values to container.
| N | number of values |
| object | function object returning value |
Definition at line 124 of file JGarage.hh.
|
inline |
For-each method.
| object | function object |
Definition at line 138 of file JGarage.hh.
|
inline |
Get minimal value corresponding given maximal probability.
| P | probability [0,1> |
Definition at line 154 of file JGarage.hh.
|
inline |
Get maximal probability corresponding given minimal value.
| value | value |
Definition at line 196 of file JGarage.hh.