Logo Search packages:      
Sourcecode: quantlib version File versions

QuantLib::ConvergenceStatistics< T, U > Class Template Reference

#include <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.

Test:
results are tested against known good values.

Definition at line 58 of file convergencestatistics.hpp.


Public Types

typedef std::vector< std::pair
< Size, value_type > > 
table_type
typedef T::value_type value_type

Public Member Functions

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

Private Attributes

Size nextSampleSize_
samplingRule_
table_type table_

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

Generated by  Doxygen 1.6.0   Back to index