Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
felsenstein81.h
1 /* Marmote is free software: you can redistribute it and/or modify
2 it under the terms of the GNU General Public License as published by
3 the Free Software Foundation, either version 3 of the License, or
4 (at your option) any later version.
5 
6 Marmote is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 GNU General Public License for more details.
10 
11 You should have received a copy of the GNU General Public License
12 along with Marmote. If not, see <http://www.gnu.org/licenses/>.
13 
14 Copyright 2015 Alain Jean-Marie, Jean-Michel Fourneau, Jean-Marc Vincent, Issam Rabhi */
15 
16 #ifndef FELSENSTEIN81_H
17 #define FELSENSTEIN81_H
18 
19 #include "markovChain.h"
20 #include "Distribution/discreteDistribution.h"
21 
30 class felsenstein81 : public markovChain
31 {
32  public:
41  felsenstein81( double p[4] , double mu);
50  felsenstein81( discreteDistribution* d, double mu);
60  void makeMarkovChain();
61 
73 
85  simulateChain( double tMax,
86  bool stats, bool traj,
87  bool withIncrements,
88  bool trace );
89 
97  Distribution* hittingTimeDistribution( int iState, bool* hittingSet);
98 
105  double* averageHittingTime( bool* hittingSet );
106 
107 
108 protected:
109  int _size;
110  double* _stateSpace;
112  double _transSpeed;
114 };
115 
116 #endif // FELSENSTEIN81_H
Markov Chain class.
Definition: markovChain.h:32
simulationResult * simulateChain(double tMax, bool stats, bool traj, bool withIncrements, bool trace)
Definition: felsenstein81.cpp:120
felsenstein81(double p[4], double mu)
Definition: felsenstein81.cpp:24
Distribution * hittingTimeDistribution(int iState, bool *hittingSet)
Computes the hitting time distribution. It is an exponential distribution with parameter equal to the...
Definition: felsenstein81.cpp:244
discreteDistribution * stationaryDistribution()
Definition: felsenstein81.cpp:111
A class for representing probability distributions.
Definition: Distribution.h:44
double * _stateSpace
representation of the state space
Definition: felsenstein81.h:110
int _size
the number of values; 4 at the moment
Definition: felsenstein81.h:109
void makeMarkovChain()
Definition: felsenstein81.cpp:71
double * averageHittingTime(bool *hittingSet)
Computes the average hitting time from every state. It is either 0, or the inverse of the speed times...
Definition: felsenstein81.cpp:258
Ajout de fonctionalites sur les matrices F81 (Felsenstein 81) Ce sont des matrices 4x4 qui sont carac...
Definition: felsenstein81.h:30
discreteDistribution * _transDistrib
the distribution "p"
Definition: felsenstein81.h:111
~felsenstein81()
Definition: felsenstein81.cpp:64
double _transSpeed
the speed parameter "mu"
Definition: felsenstein81.h:112
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
discreteDistribution * transientDistribution(double)
Definition: felsenstein81.cpp:90