00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _MARKOVGSLSOLVER_H
00011 #define _MARKOVGSLSOLVER_H
00012
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 class MarkovGslSolver
00026 {
00027 public:
00028 MarkovGslSolver();
00029 ~MarkovGslSolver();
00030
00032
00034 bool getIsInitialized() const;
00035 string getMethod() const;
00036 void setMethod( string method );
00037 double getRelativeAccuracy() const;
00038 void setRelativeAccuracy( double value );
00039 double getAbsoluteAccuracy() const;
00040 void setAbsoluteAccuracy( double value );
00041 double getInternalDt() const;
00042 void setInternalDt( double value );
00043
00045
00047
00048 void process( const Eref& e, ProcPtr info );
00049 void reinit( const Eref& e, ProcPtr info );
00050
00051 void init( vector< double > );
00052 void handleQ( vector< vector< double > > );
00053
00054 static const Cinfo* initCinfo();
00055 private:
00056 bool isInitialized_;
00057 string method_;
00058 double absAccuracy_;
00059 double relAccuracy_;
00060 double internalStepSize_;
00061 double* stateGsl_;
00062
00063
00064
00065 unsigned int nVars_;
00066 vector< double > state_;
00067 vector< double > initialState_;
00068 vector< vector< double > > Q_;
00069
00070 const gsl_odeiv_step_type* gslStepType_;
00071 gsl_odeiv_step* gslStep_;
00072 gsl_odeiv_control* gslControl_;
00073 gsl_odeiv_evolve* gslEvolve_;
00074 gsl_odeiv_system gslSys_;
00075
00076 static int evalSystem( double, const double*, double*, void* );
00077 };
00078 #endif