Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
transitionStructure
eventMixture.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 EVENTMIXTURE_H
17
#define EVENTMIXTURE_H
18
19
#include "transitionStructure.h"
20
#include "sparseMatrix.h"
21
#include <string>
22
23
class
eventMixture
:
public
transitionStructure
24
{
25
private
:
26
// specific attributes
27
int
_nbEvents;
28
double
* _eventProba;
29
std::string* _eventName;
30
int
** _eventTransition;
32
public
:
33
// constructors, destructor
42
eventMixture
(
int
size
,
int
nbEvents
,
double
* probas, std::string* names,
int
** transitions );
47
eventMixture
(
sparseMatrix
* spMat);
52
~eventMixture
();
53
54
public
:
55
// accessors
60
int
nbEvents
() {
return
_nbEvents; }
66
double
eventProba
(
int
e) {
return
_eventProba[e]; }
67
68
public
:
69
// implementation of virtual methods
70
bool
setEntry
(
int
i,
int
j,
double
val);
71
double
getEntry
(
int
i,
int
j);
72
int
getNbElts
(
int
i);
73
int
getCol
(
int
i,
int
k);
74
double
getEntryByCol
(
int
i,
int
k);
75
discreteDistribution
*
getTransDistrib
(
int
i);
76
double
rowSum
(
int
i);
77
eventMixture
*
copy
();
78
eventMixture
*
uniformize
();
79
void
evaluateMeasure
(
double
* pi,
double
* res) ;
80
void
evaluateMeasure
(
discreteDistribution
* d,
discreteDistribution
* res);
81
void
evaluateValue
(
double
* v,
double
* res);
82
void
write
(FILE* out, std::string format);
83
84
private
:
85
// specific technical methods
97
int
consolidate(
int
i,
int
* destinations,
double
* values);
98
};
99
100
#endif // EVENTMIXTURE_H
Generated on Thu May 21 2015 17:06:41 for Marmote Core by
1.8.3.1