Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
simulationResult.h
1 #ifndef SIMULATIONRESULT_H
2 #define SIMULATIONRESULT_H
3 
4 using namespace std;
5 
6 #include <string.h>
7 #include "Distribution/discreteDistribution.h"
8 #include "marmoteConstants.h" // at least for the definition of enum timeType
9 
19 {
20  private:
21  timeType _type;
22  int _stateSpaceSize;
23  int _trajectorySize;
24  bool _hasDistrib;
25  bool _hasTrajectory;
26  discreteDistribution* _distrib;
27  double* _dates;
28  double* _increments;
29  int* _states;
31  public:
32  // constructors
40  simulationResult( int size, timeType t, bool stats );
48  simulationResult( string format, string modelName, bool stats );
49 
50  // destructor
56 
57  public:
58  // accessors
64  void setTrajectory(bool v) { _hasTrajectory = v; }
70  void setTrajectorySize(int l) { _trajectorySize = l; }
78  void setTrajectory(double* d, int *s) { _dates = d; _states = s; }
85  void distrib(discreteDistribution *d) { _distrib = d; }
91  discreteDistribution* getDistribution() { return _distrib; }
92 
93 private:
94  // technical private methods
95  ssize_t getDataLine(char** line, size_t *n, FILE* stream);
96 
97 };
98 
99 #endif // SIMULATIONRESULT_H
void setTrajectory(double *d, int *s)
Sets the trajectory element of the object, from pointers to tables. Tables are not copied...
Definition: simulationResult.h:78
void setTrajectorySize(int l)
Definition: simulationResult.h:70
void distrib(discreteDistribution *d)
Sets the empirical distribution, from a distribution object. The object is not copied.
Definition: simulationResult.h:85
void setTrajectory(bool v)
Definition: simulationResult.h:64
discreteDistribution * getDistribution()
Accessor to the empirical distribution.
Definition: simulationResult.h:91
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