ConvergenceStatistics Class Template Reference

#include <ql/Math/convergencestatistics.hpp>

List of all members.


Detailed Description

template<class T, class U = DoublingConvergenceSteps>
class QuantLib::ConvergenceStatistics< T, U >

statistics class with convergence table

This class decorates another statistics class adding a convergence table calculation. The table tracks the convergence of the mean.

It is possible to specify the number of samples at which the mean should be stored by mean of the second template parameter; the default is to store $ 2^{n-1} $ samples at the $ n $ -th step. Any passed class must implement the following interface:

        Size initialSamples() const;
        Size nextSamples(Size currentSamples) const;
as well as a copy constructor.

Tests:
results are tested against known good values.


Public Member Functions

 ConvergenceStatistics (const U &rule=U())
void add (Real value, Real weight=1.0)
template<class DataIterator>
void addSequence (DataIterator begin, DataIterator end)
template<class DataIterator, class WeightIterator>
void addSequence (DataIterator begin, DataIterator end, WeightIterator wbegin)
void reset ()
const std::vector< std::pair<
Size, Real > > & 
convergenceTable () const


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen