19 #include "marmoteConstants.h"
20 #include "Distribution/Distribution.h"
21 #include "Distribution/discreteDistribution.h"
22 #include "simulationResult.h"
23 #include "transitionStructure/transitionStructure.h"
106 markovChain(
string format,
string param[],
int nbreParam,
string modelName,
187 void setAbstract(
string abstract[]);
204 string modelName(){
if ( _modelName.size() == 0 ) fprintf( stderr,
"Warning: empty model name.\n" );
return _modelName;}
220 for(
int i=0; i<_abstractNbre;i++)
222 cout<<i<<
":"<<_abstract[i];
243 bool Stats,
bool Traj,
244 bool withIncrements,
bool Print );
257 bool stats,
bool traj,
271 bool stats,
bool traj,
289 bool stats,
bool Traj,
304 Distribution* stationaryDistribution_iterative(
string method,
307 string initDistribType,
325 virtual Distribution* stationaryDistributionCT(
bool progress );
336 virtual Distribution* stationaryDistributionCT_embedding(
int tMax,
double epsilon,
348 virtual Distribution* stationaryDistribution_power(
int tMax,
double epsilon,
359 void NCDProperty(
double epsilon);
366 void BandIMSUB(std::string modelName=
"modelName");
396 void ProdFundSW(std::string modelName=
"modelName");
403 void RowSum(std::string modelName=
"modelName");
428 Distribution* transientDistributionR(
int fromState,
double t );
436 Distribution* transientDistributionDT(
int fromState,
int t );
460 bool stats,
bool traj,
bool trace );
471 double transitionProbability(
int stateFrom,
int stateTo);
480 std::vector<int> absorbingStates();
490 std::vector< std::vector<int> > recurrentClasses();
500 std::vector< std::vector<int> > communicatingClasses();
509 bool isirreducible();
520 bool isaccessible(
int stateFrom,
int stateTo);
541 Distribution* hittingTimeDistribution(
int iState,
bool *hitSetIndicator );
554 int* simulateHittingTime(
int iState,
bool *hittingSet,
555 int nbSamples,
int tMax );
562 double* averageHittingTime(
bool *hitSetIndicator );
571 double* averageHittingTimeDT(
bool *hitSetIndicator );
580 double* averageHittingTimeDT_iterative(
bool *hitSetIndicator );
619 void setSizeType(
const string path);
630 int charVectorElt2State(SEXP elt, std::string
function );
641 virtual void write( FILE *out,
bool withReward );
650 virtual void write(
string format,
string modelName);
658 void write(
string format ) {
write( format, modelName() ); }
665 std::string toString(std::string format);
669 #endif // MARKOVCHAIN_H
Markov Chain class.
Definition: markovChain.h:42
string _format
format/language of the model
Definition: markovChain.h:58
void traj(const string path, const string file_out, int state, const int length)
PSI Trajectory Simulation.
Definition: psi_traj.cpp:86
string * _abstract
table of abstraction parameters
Definition: markovChain.h:57
bool _isAbstract
true if the object is "abstract", i.e. a pointer to some files
Definition: markovChain.h:55
transitionStructure * generator()
Read accessor to get the value of _generator which is a transitionStructure.
Definition: markovChain.h:129
void setAbstractNbre(int abstractNbre)
Utility to set the value of _abstractNbre.
Definition: markovChain.h:179
int _stateSpaceSize
size of the state space (should be a pointer on the state space itself)
Definition: markovChain.h:48
string modelName()
Utility to get _modelName.
Definition: markovChain.h:204
int stateSpaceSize()
Read accessor to get the number of states in the state space of the Markov chain. ...
Definition: markovChain.h:123
bool _debug
internal debugging indicator
Definition: markovChain.h:53
string _modelName
name of the model
Definition: markovChain.h:59
void setInitDistribution(discreteDistribution *d)
Write accessor to set the value of _initDistribution which is a discreteDistribution.
Definition: markovChain.h:135
Utilization of the Standard Template Library.
A class for representing probability distributions.
Definition: Distribution.h:44
int _abstractNbre
number of abstraction parameters
Definition: markovChain.h:56
string format()
Utility to get _format.
Definition: markovChain.h:210
void setModelName(string modelName)
Utility to set the value of _modelName.
Definition: markovChain.h:172
void write(string format)
Method for writing Markov chains in files with various formats. This version uses the given model nam...
Definition: markovChain.h:658
void setFormat(string format)
Utility to set the value of _format.
Definition: markovChain.h:165
transitionStructure * _generator
transition structure of the chain
Definition: markovChain.h:49
void * RInside
recast nonexisting RInside type to void
Definition: markovChain.h:64
Abstract class for transition structures. These are structures which describe transitions to one stat...
Definition: transitionStructure.h:33
discreteDistribution * _initDistribution
initial distribution of the process
Definition: markovChain.h:52
void * SEXP
recast nonexisting SEXP type to void
Definition: markovChain.h:65
timeType _type
time type: discrete or continuous
Definition: markovChain.h:47
The general discrete distribution with finite support.
Definition: discreteDistribution.h:25
int abstractNbre()
Utility to get _abstractNbre.
Definition: markovChain.h:196
The class for transmitting (Monte Carlo) simulation results between objects. Simulation results may b...
Definition: simulationResult.h:33
void setGenerator(transitionStructure *tr)
Write accessor to set the value of _generator which is a transitionStructure.
Definition: markovChain.h:141