QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
statistics class with convergence table More...
#include <convergencestatistics.hpp>
Public Types | |
typedef T::value_type | value_type |
typedef std::vector< std::pair< Size, value_type > > | table_type |
Public Member Functions | |
ConvergenceStatistics (const T &stats, const U &rule=U()) | |
ConvergenceStatistics (const U &rule=U()) | |
void | add (const value_type &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, value_type > > & | convergenceTable () const |
Private Attributes | |
table_type | table_ |
U | samplingRule_ |
Size | nextSampleSize_ |
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:
as well as a copy constructor.
Definition at line 58 of file convergencestatistics.hpp.
typedef T::value_type value_type |
Definition at line 60 of file convergencestatistics.hpp.
typedef std::vector<std::pair<Size,value_type> > table_type |
Definition at line 61 of file convergencestatistics.hpp.
ConvergenceStatistics | ( | const T & | stats, |
const U & | rule = U() |
||
) |
ConvergenceStatistics | ( | const U & | rule = U() | ) |
void add | ( | const value_type & | value, |
Real | weight = 1.0 |
||
) |
void addSequence | ( | DataIterator | begin, |
DataIterator | end | ||
) |
void addSequence | ( | DataIterator | begin, |
DataIterator | end, | ||
WeightIterator | wbegin | ||
) |
void reset |
Definition at line 116 of file convergencestatistics.hpp.
const ConvergenceStatistics< T, U >::table_type & convergenceTable |
Definition at line 124 of file convergencestatistics.hpp.
|
private |
Definition at line 81 of file convergencestatistics.hpp.
|
private |
Definition at line 82 of file convergencestatistics.hpp.
|
private |
Definition at line 83 of file convergencestatistics.hpp.