3 #include <boost/function.hpp>
18 template<
class SampleGenerator>
23 SampleGenerator Generator;
31 virtual void CalcErrors_Imp(
double &m,
double &v) = 0;
50 StatErrEst(
const int nsamples, SampleGenerator TheGenerator) :
This class is used as a base for stochastic error estimation.
std::vector< double > & GetSamples()
public access function to generated samples
void CalcErrors(double &m, double &v)
The main function, calculates the error, by generating samples and calling the derived function...
StatErrEst(const int nsamples, SampleGenerator TheGenerator)
The constructor takes two parameters, the desired number of samples and the function object to genera...
std::vector< double > Samples
the vector that holds the generated samples
int nrealizations
How many samples are requested.