19 template<
class SampleGenerator>
24 virtual void CalcErrors_Imp(
double &m,
double &v);
27 Jacknife(
const int nrea, SampleGenerator TheGenerator) :
28 StatErrEst<SampleGenerator>(nrea, TheGenerator)
38 template<
class SampleGenerator>
39 void Jacknife<SampleGenerator>::CalcErrors_Imp(
double &m,
double &v)
41 m =
Mean(this->Samples.begin(), this->Samples.end());
42 if (this->nrealizations < 2)
47 v =
Variance(this->Samples.begin(), this->Samples.end(), m);
This class is used as a base for stochastic error estimation.
std::iterator_traits< InputIterator >::value_type Mean(InputIterator begin, InputIterator end)
Calculate the mean for a given range.
Implements the Jacknifing method of error estimation.
Jacknife(const int nrea, SampleGenerator TheGenerator)
The constructor just passes all its arguments to the base class.
std::iterator_traits< InputIterator >::value_type Variance(InputIterator begin, InputIterator end, typename std::iterator_traits< InputIterator >::value_type mv)
Calculate the Variance and give the mean as a third input parameter.