1 #ifndef MTSAMPLEGENERATOR_H_
2 #define MTSAMPLEGENERATOR_H_
3 #include <boost/function.hpp>
4 #include <boost/random/lagged_fibonacci.hpp>
5 #include <boost/random/normal_distribution.hpp>
6 #include <boost/random/variate_generator.hpp>
25 boost::lagged_fibonacci607 generator;
26 boost::normal_distribution<> Zxxr_dist;
27 boost::normal_distribution<> Zxxi_dist;
28 boost::normal_distribution<> Zxyr_dist;
29 boost::normal_distribution<> Zxyi_dist;
30 boost::normal_distribution<> Zyxr_dist;
31 boost::normal_distribution<> Zyxi_dist;
32 boost::normal_distribution<> Zyyr_dist;
33 boost::normal_distribution<> Zyyi_dist;
35 boost::variate_generator<boost::lagged_fibonacci607&,
36 boost::normal_distribution<> > Zxxr;
37 boost::variate_generator<boost::lagged_fibonacci607&,
38 boost::normal_distribution<> > Zxxi;
39 boost::variate_generator<boost::lagged_fibonacci607&,
40 boost::normal_distribution<> > Zxyr;
41 boost::variate_generator<boost::lagged_fibonacci607&,
42 boost::normal_distribution<> > Zxyi;
43 boost::variate_generator<boost::lagged_fibonacci607&,
44 boost::normal_distribution<> > Zyxr;
45 boost::variate_generator<boost::lagged_fibonacci607&,
46 boost::normal_distribution<> > Zyxi;
47 boost::variate_generator<boost::lagged_fibonacci607&,
48 boost::normal_distribution<> > Zyyr;
49 boost::variate_generator<boost::lagged_fibonacci607&,
50 boost::normal_distribution<> > Zyyi;
51 boost::function<double(const MTTensor*)> func;
59 const MTTensor &Z,
const double errorlevel = 0.0);
MTSampleGenerator(boost::function< double(const MTTensor *)> f, const MTTensor &Z, const double errorlevel=0.0)
The constructor needs a pointer to a member function of MTTensor that returns a double, an impedance element and an errolevel for all elements.
void f(vector< double > &v1, vector< double > &v2, vector< double > &v3, vector< double > &v4)
virtual ~MTSampleGenerator()
Generate random elements of a calculated quantity for MT impedance data.
double operator()()
each call to operator() returns a new random sample
Stores MT-Tensor components at a single frequency, calculates derived quantities. ...