GPLIB++
Public Member Functions | Protected Attributes | List of all members
gplib::StatErrEst< SampleGenerator > Class Template Referenceabstract

This class is used as a base for stochastic error estimation. More...

#include <StatErrEst.h>

Inheritance diagram for gplib::StatErrEst< SampleGenerator >:
Inheritance graph
[legend]

Public Member Functions

std::vector< double > & GetSamples ()
 public access function to generated samples More...
 
void CalcErrors (double &m, double &v)
 The main function, calculates the error, by generating samples and calling the derived function. More...
 
 StatErrEst (const int nsamples, SampleGenerator TheGenerator)
 The constructor takes two parameters, the desired number of samples and the function object to generate them. More...
 
virtual ~StatErrEst ()
 

Protected Attributes

int nrealizations
 How many samples are requested. More...
 
std::vector< double > Samples
 the vector that holds the generated samples More...
 

Detailed Description

template<class SampleGenerator>
class gplib::StatErrEst< SampleGenerator >

This class is used as a base for stochastic error estimation.

This base class is used for stochastic error estimation with Bootstrap, Jacknife or similar methods. It takes a template parameter, the type of the function object that generates individual samples for the analysis. The only requirement is, that operator() returns a value that is convertible to a double.

Definition at line 19 of file StatErrEst.h.

Constructor & Destructor Documentation

template<class SampleGenerator >
gplib::StatErrEst< SampleGenerator >::StatErrEst ( const int  nsamples,
SampleGenerator  TheGenerator 
)
inline

The constructor takes two parameters, the desired number of samples and the function object to generate them.

Definition at line 50 of file StatErrEst.h.

template<class SampleGenerator >
virtual gplib::StatErrEst< SampleGenerator >::~StatErrEst ( )
inlinevirtual

Definition at line 55 of file StatErrEst.h.

Member Function Documentation

template<class SampleGenerator >
void gplib::StatErrEst< SampleGenerator >::CalcErrors ( double &  m,
double &  v 
)
inline

The main function, calculates the error, by generating samples and calling the derived function.

Definition at line 44 of file StatErrEst.h.

Referenced by PrintComponent().

template<class SampleGenerator >
std::vector<double>& gplib::StatErrEst< SampleGenerator >::GetSamples ( )
inline

public access function to generated samples

Definition at line 39 of file StatErrEst.h.

References gplib::StatErrEst< SampleGenerator >::Samples.

Member Data Documentation

template<class SampleGenerator >
int gplib::StatErrEst< SampleGenerator >::nrealizations
protected

How many samples are requested.

Definition at line 34 of file StatErrEst.h.

template<class SampleGenerator >
std::vector<double> gplib::StatErrEst< SampleGenerator >::Samples
protected

the vector that holds the generated samples

Definition at line 36 of file StatErrEst.h.

Referenced by gplib::StatErrEst< SampleGenerator >::GetSamples().


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