Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
homogeneous1DRandomWalk.h
1 #ifndef HOMOGENOUS1DRANDOMWALK_H
2 #define HOMOGENOUS1DRANDOMWALK_H
3 
4 #include "markovChain.h"
5 #include "Distribution/discreteDistribution.h"
6 #include "Distribution/geometricDistribution.h"
7 
18 {
19  protected:
20  int _size;
21  double* _stateSpace;
22  double _p;
23  double _q;
24  double _r;
26  public:
27  homogeneous1DRandomWalk( double l, double m );
28  homogeneous1DRandomWalk( int sz, double l, double m );
30 
31  void makeMarkovChain();
32 
33  discreteDistribution* transientDistribution( int t, int nMax );
37  simulateChain( long int tMax, bool stat, bool traj, bool trace );
38 
39  public:
40  void write(string format, string prefix);
41 
42 };
43 
44 #endif // HOMOGENOUS1DRANDOMWALK_H
void write(string format, string prefix)
Writes a homogeneous1DRandomWalk chain in files with some specified format. Supported formats: ...
Definition: homogeneous1DRandomWalk.cpp:352
Markov Chain class.
Definition: markovChain.h:32
void makeMarkovChain()
Instantiation of the generator for the markovChain ancestor.
Definition: homogeneous1DRandomWalk.cpp:86
~homogeneous1DRandomWalk()
Destructor for a homogeneous1DRandomWalk chain.
Definition: homogeneous1DRandomWalk.cpp:75
simulationResult * simulateChain(long int tMax, bool stat, bool traj, bool trace)
Simulates the evolution of a homogeneous1DRandomWalk chain.
Definition: homogeneous1DRandomWalk.cpp:218
geometricDistribution * stationaryDistribution()
Computes the stationary distribution for a homogeneous1DRandomWalk chain with infinite state space...
Definition: homogeneous1DRandomWalk.cpp:155
discreteDistribution * transientDistribution(int t, int nMax)
Computes the transient distribution for a RW1D Markov Chain.
Definition: homogeneous1DRandomWalk.cpp:114
double _r
r = 1 - p - q is the proba of staying in the same state
Definition: homogeneous1DRandomWalk.h:39
The 1-dimensional random walk with homogeneous transition probabilities. This model is characterized ...
Definition: homogeneous1DRandomWalk.h:32
double _p
the probability to jump to the right
Definition: homogeneous1DRandomWalk.h:37
homogeneous1DRandomWalk(double l, double m)
Constructor for a homogeneous1DRandomWalk chain with infinite state space.
Definition: homogeneous1DRandomWalk.cpp:35
string format()
Utility to get _format.
Definition: markovChain.h:182
double * _stateSpace
representation of the state space when finite
Definition: homogeneous1DRandomWalk.h:36
int _size
the number of states; possibly infinite
Definition: homogeneous1DRandomWalk.h:35
double _q
the probability to jump to the left
Definition: homogeneous1DRandomWalk.h:38
The geometric distribution with starting value 0. The parameter "p" is called "ratio".
Definition: geometricDistribution.h:27
The general discrete distribution with finite support.
Definition: discreteDistribution.h:25
The class for transmitting (Monte Carlo) simulation results between objects. Simulation results may b...
Definition: simulationResult.h:18