Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
eventMixture.h
1 #ifndef EVENTMIXTURE_H
2 #define EVENTMIXTURE_H
3 
4 #include "transitionStructure.h"
5 #include "sparseMatrix.h"
6 #include <string>
7 
9 {
10 private:
11  // specific attributes
12  int _nbEvents;
13  double* _eventProba;
14  std::string* _eventName;
15  int** _eventTransition;
17 public:
18  // constructors, destructor
27  eventMixture(int size, int nbEvents, double* probas, std::string* names, int** transitions );
32  eventMixture(sparseMatrix* spMat);
37  ~eventMixture();
38 
39 public:
40  // accessors
45  int nbEvents() { return _nbEvents; }
51  double eventProba(int e) { return _eventProba[e]; }
52 
53 public:
54  // implementation of virtual methods
55  bool setEntry(int i, int j, double val);
56  double getEntry(int i, int j);
57  int getNbElts(int i);
58  int getCol(int i, int k);
59  double getEntryByCol(int i, int k);
61  double rowSum(int i);
62  eventMixture* copy();
64  void evaluateMeasure(double* pi, double* res) ;
66  void evaluateValue(double* v, double* res);
67  void write(FILE* out, std::string format);
68 
69 private:
70  // specific technical methods
82  int consolidate(int i, int* destinations, double* values);
83 };
84 
85 #endif // EVENTMIXTURE_H
void evaluateMeasure(double *pi, double *res)
Computing the action of the transition structure on some measure, the measure being represented as a ...
Definition: eventMixture.cpp:216
int getCol(int i, int k)
Method to get the number of the state corresponding to transition number k in the list of possible tr...
Definition: eventMixture.cpp:153
double rowSum(int i)
Sum of entries on some row i. Always 1.0 since this is a discrete-time transition structure...
Definition: eventMixture.cpp:186
discreteDistribution * getTransDistrib(int i)
Method to get the transition from some state as a probability distribution.
Definition: eventMixture.cpp:169
eventMixture * copy()
Copying a transition structure.
Definition: eventMixture.cpp:194
eventMixture(int size, int nbEvents, double *probas, std::string *names, int **transitions)
Constructor from arrays.
Definition: eventMixture.cpp:22
int getNbElts(int i)
Method to get the number of non-zero entries in a transition from some state. This can be seen as the...
Definition: eventMixture.cpp:145
double eventProba(int e)
Read accessor for the probabilities associated to each event.
Definition: eventMixture.h:51
int nbEvents()
Read accessor for the number of events.
Definition: eventMixture.h:45
bool setEntry(int i, int j, double val)
Method to set the value associated with some transition. Not applicable here.
Definition: eventMixture.cpp:122
Definition: eventMixture.h:8
Abstract class for transition structures. These are structures which describe transitions to one stat...
Definition: transitionStructure.h:17
eventMixture * uniformize()
Uniformizing a transition structure. Since the origin structure is already of discrete-time type...
Definition: eventMixture.cpp:208
double getEntryByCol(int i, int k)
Method to get the value attached to transition number k in the list of possible transitions from some...
Definition: eventMixture.cpp:161
Class sparseMatrix: implementation of a transition structure using the sparse matrix data structure...
Definition: sparseMatrix.h:14
void write(FILE *out, std::string format)
Output method for a transition structure.
int size()
Read accessor for the size of the state space.
Definition: transitionStructure.h:41
double getEntry(int i, int j)
Method to get the value associated with some transition. When state parameters are out of bounds...
Definition: eventMixture.cpp:132
The general discrete distribution with finite support.
Definition: discreteDistribution.h:25
void evaluateValue(double *v, double *res)
Computing the action of the transition structure on some vector of values. This corresponds to the mu...
Definition: eventMixture.cpp:241
~eventMixture()
Destructor of the class.
Definition: eventMixture.cpp:108