MTSampleGenerator.h
Go to the documentation of this file.00001 #ifndef MTSAMPLEGENERATOR_H_
00002 #define MTSAMPLEGENERATOR_H_
00003 #include <boost/function.hpp>
00004 #include <boost/random/lagged_fibonacci.hpp>
00005 #include <boost/random/normal_distribution.hpp>
00006 #include <boost/random/variate_generator.hpp>
00007 #include <complex>
00008 #include "MTTensor.h"
00009
00010 namespace gplib
00011 {
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 class MTSampleGenerator
00023 {
00024 private:
00025 boost::lagged_fibonacci607 generator;
00026 boost::normal_distribution<> Zxxr_dist;
00027 boost::normal_distribution<> Zxxi_dist;
00028 boost::normal_distribution<> Zxyr_dist;
00029 boost::normal_distribution<> Zxyi_dist;
00030 boost::normal_distribution<> Zyxr_dist;
00031 boost::normal_distribution<> Zyxi_dist;
00032 boost::normal_distribution<> Zyyr_dist;
00033 boost::normal_distribution<> Zyyi_dist;
00034
00035 boost::variate_generator<boost::lagged_fibonacci607&,
00036 boost::normal_distribution<> > Zxxr;
00037 boost::variate_generator<boost::lagged_fibonacci607&,
00038 boost::normal_distribution<> > Zxxi;
00039 boost::variate_generator<boost::lagged_fibonacci607&,
00040 boost::normal_distribution<> > Zxyr;
00041 boost::variate_generator<boost::lagged_fibonacci607&,
00042 boost::normal_distribution<> > Zxyi;
00043 boost::variate_generator<boost::lagged_fibonacci607&,
00044 boost::normal_distribution<> > Zyxr;
00045 boost::variate_generator<boost::lagged_fibonacci607&,
00046 boost::normal_distribution<> > Zyxi;
00047 boost::variate_generator<boost::lagged_fibonacci607&,
00048 boost::normal_distribution<> > Zyyr;
00049 boost::variate_generator<boost::lagged_fibonacci607&,
00050 boost::normal_distribution<> > Zyyi;
00051 boost::function<double(const MTTensor*)> func;
00052 MTTensor Data;
00053 public:
00054
00055
00056
00057
00058 MTSampleGenerator(boost::function<double(const MTTensor*)> f,
00059 const MTTensor &Z, const double errorlevel = 0.0);
00060
00061 double operator()();
00062 virtual ~MTSampleGenerator();
00063 };
00064
00065 }
00066 #endif