Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

Protected Attributes

QuantLib::IncrementalStatistics Class Reference

Statistics tool based on incremental accumulation. More...

#include <incrementalstatistics.hpp>

List of all members.

Public Member Functions

Inspectors
Size samples () const
 number of samples collected
Real weightSum () const
 sum of data weights
Real mean () const
Real variance () const
Real standardDeviation () const
Real downsideVariance () const
Real downsideDeviation () const
Real errorEstimate () const
Real skewness () const
Real kurtosis () const
Real min () const
Real max () const
Modifiers
void add (Real value, Real weight=1.0)
 adds a datum to the set, possibly with a weight
template<class DataIterator >
void addSequence (DataIterator begin, DataIterator end)
 adds a sequence of data to the set, with default weight
template<class DataIterator , class WeightIterator >
void addSequence (DataIterator begin, DataIterator end, WeightIterator wbegin)
 adds a sequence of data to the set, each with its weight
void reset ()
 resets the data to a null set

Protected Attributes

Real cubicSum_
Real downsideQuadraticSum_
Size downsideSampleNumber_
Real downsideSampleWeight_
Real fourthPowerSum_
Real max_
Real min_
Real quadraticSum_
Size sampleNumber_
Real sampleWeight_
Real sum_

Detailed Description

Statistics tool based on incremental accumulation.

It can accumulate a set of data and return statistics (e.g: mean, variance, skewness, kurtosis, error estimation, etc.)

Warning:
high moments are numerically unstable for high average/standardDeviation ratios

Definition at line 40 of file incrementalstatistics.hpp.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index