Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
mc.h
1 /* Structures de donnees specifiques des chaines de Markov */
2 
3 
4 
5 #ifndef _MC_H_
6 #define _MC_H_
7 
8 
9 #include "global.h"
10 #include "boolean.h"
11 
12 
13 #define SPARSE 1
14 #define FULL 2
15 
16 Distribution Solve_Chain( Markov_Chain Chain, boolean Reward, boolean Progress);
17 Distribution Solve_Cont_Time_Chain( Markov_Chain Chain, boolean Reward, boolean Progress);
18 Distribution Solve_Disc_Time_Chain( Markov_Chain Chain, boolean Reward, boolean Progress);
19 /* , double * distribution, char * typeDistribution ); */
20 
21 double Dist( double *v1, double *v2, int Size );
22 
23 /***************************************************/
24 
25 Markov_Chain New_Markov_Chain( int, boolean, int );
26  void Write_Markov_Chain( FILE*, Markov_Chain, boolean );
27 extern Markov_Chain Read_Chain( char *File_Name );
28 
29 /**************************************************/
30 
31 
32 /* Previous interfaces, with trajectory elements passed as arguments.
33  *
34 void Sim_Chain( Markov_Chain, double, boolean, boolean, boolean,
35  double *, double *);
36 void Sim_Cont_Time_Chain( Markov_Chain Chain, double T_Max,
37  boolean Stats, boolean Traj,
38  boolean Increments );
39 
40 extern Simulation_Result Sim_Cont_Time_Chain(Markov_Chain Chain, double T_Max,
41  boolean Stats, boolean Traj,
42  boolean Increments, boolean Print ); //, double * T, double * State);
43 */
44 extern Simulation_Result Sim_Disc_Time_Chain(Markov_Chain Chain,
45  int T_Max,
46  boolean Stats, boolean Traj,
47  boolean Print );
48 
49 extern Simulation_Result Sim_Cont_Time_Chain( Markov_Chain Chain,
50  double T_Max,
51  boolean Stats, boolean Traj,
52  boolean Increments,
53  boolean Print );
54 
55 Simulation_Result Sim_Chain( Markov_Chain, double, boolean, boolean,
56  boolean, boolean );
57 
58 /**************************************************/
59 /* Functions for distributions */
60 /**************************************************/
61 Distribution New_Distribution(char*,int);
62 void Print_Distribution(Distribution,FILE*);
63 void Free_Distribution(Distribution);
64 
65 /**************************************************/
66 /* Functions for simulation results */
67 /**************************************************/
68 Simulation_Result New_Simulation_Result(int,int,boolean);
69 void Print_Simulation_Result(Simulation_Result,FILE*,boolean,boolean,boolean);
70 void Free_Simulation_Result();
71 
72 /**************************************************/
73 /* Utilitaries */
74 /**************************************************/
75 double U_0_1( void );
76 double Exponential( double Rate );
77 
78 double Distrib_Distance_L1( Distribution, Distribution );
79 double Distrib_Distance_L2( Distribution, Distribution );
80 double Distrib_Distance_Linfini( Distribution, Distribution );
81 
82 /* extern Markov_Chain New_Markov_Chain( int, boolean, int );
83  * extern void Write_Markov_Chain( FILE*, Markov_Chain, boolean );
84  */
85 
86 #endif