| 
    Jpp
    17.3.0-rc.1
    
   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="", const bool quantiles=false) | |
| Constructor.  More... | |
| template<class JElement_t , class JAllocator_t > | |
| JQuantile (const JTitle &title, const array_type< JElement_t, JAllocator_t > &buffer, const bool quantiles=false, const double w=1.0) | |
| Constructor.  More... | |
| void | reset () | 
| Reset.  More... | |
| JQuantile & | add (const JQuantile &Q) | 
| Add quantile.  More... | |
| void | put (const double x, const double w=1.0) | 
| Put value.  More... | |
| template<class JElement_t , class JAllocator_t > | |
| void | put (const array_type< JElement_t, JAllocator_t > &buffer, const double w=1.0) | 
| Put data.  More... | |
| long long int | getCount () const | 
| Get total count.  More... | |
| double | getTotal () const | 
| Get total weight.  More... | |
| double | getXmin () const | 
| Get minimum value.  More... | |
| double | getXmax () const | 
| Get maximum value.  More... | |
| double | getWmin () const | 
| Get minimum weight.  More... | |
| double | getWmax () const | 
| Get maximum weight.  More... | |
| double | getMean () const | 
| Get mean value.  More... | |
| double | getSTDev () const | 
| Get standard deviation.  More... | |
| double | getDeviation (const bool relative=true) const | 
| Get maximal deviation from average.  More... | |
| bool | hasAccuracy (const double precision) const | 
| Test relative accuracy.  More... | |
| double | getQuantile (const double Q, const Quantile_t option=forward_t) const | 
| Get quantile.  More... | |
| std::ostream & | print (std::ostream &out, bool lpr=true) const | 
| Print quantile.  More... | |
| const std::string & | getTitle () const | 
| Get title.  More... | |
| void | setTitle (const std::string &title) | 
| Set title.  More... | |
| JFirst_t & | mul (const JSecond_t &object) | 
| Multiply with object.  More... | |
Static Protected Member Functions | |
| template<class T > | |
| static double | getQuantile (T __begin, T __end, const double W) | 
| Get quantile.  More... | |
Protected Attributes | |
| bool | quantiles | 
| double | mean | 
| double | sigma | 
| double | total | 
| long long int | count | 
| double | xmin | 
| double | xmax | 
| double | wmin | 
| double | wmax | 
| std::multimap< double, double > | buffer | 
| std::string | title | 
Friends | |
| std::ostream & | operator<< (std::ostream &out, const JQuantile &quantile) | 
| Print quantile.  More... | |
Auxiliary data structure for running average, standard deviation and quantiles.
See Knuth TAOCP vol 2, 3rd edition, page 232.
This class acts as a zero-dimensional histogram.
Note that if a weight is used, it should strictly be positive. 
Definition at line 43 of file JQuantile.hh.
Options for evaluation of quantile.
| Enumerator | |
|---|---|
| forward_t | 
 forward  | 
| symmetric_t | 
 symmatric  | 
| backward_t | 
 backward  | 
Definition at line 305 of file JQuantile.hh.
      
  | 
  inline | 
      
  | 
  inline | 
Constructor.
| title | title | 
| buffer | input data | 
| quantiles | quantiles | 
| w | weight | 
Definition at line 71 of file JQuantile.hh.
      
  | 
  inline | 
Add quantile.
| Q | quantile | 
Definition at line 108 of file JQuantile.hh.
      
  | 
  inline | 
      
  | 
  inline | 
Put data.
| buffer | input data | 
| w | weight | 
Definition at line 172 of file JQuantile.hh.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Get mean value.
Definition at line 252 of file JQuantile.hh.
      
  | 
  inline | 
Get standard deviation.
Definition at line 266 of file JQuantile.hh.
      
  | 
  inline | 
Get maximal deviation from average.
| relative | if true, relative to average, else absolute | 
Definition at line 281 of file JQuantile.hh.
      
  | 
  inline | 
Test relative accuracy.
| precision | relative precision | 
Definition at line 296 of file JQuantile.hh.
      
  | 
  inline | 
Get quantile.
| Q | quantile | 
| option | option | 
Definition at line 319 of file JQuantile.hh.
      
  | 
  inline | 
Print quantile.
| out | output stream | 
| lpr | long print | 
Definition at line 352 of file JQuantile.hh.
      
  | 
  inlinestaticprotected | 
Get quantile.
| __begin | begin of data | 
| __end | end of data | 
| W | weight | 
Definition at line 396 of file JQuantile.hh.
      
  | 
  inlineinherited | 
Get title.
      
  | 
  inlineinherited | 
Set title.
| title | title | 
      
  | 
  inlineinherited | 
      
  | 
  friend | 
Print quantile.
| out | output stream | 
| quantile | quantile | 
Definition at line 381 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 413 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 414 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 415 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 416 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 417 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 418 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 419 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 420 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 421 of file JQuantile.hh.
      
  | 
  protected | 
Definition at line 422 of file JQuantile.hh.
      
  | 
  protectedinherited | 
 1.8.5