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
multiDimHomTransition.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 MULTIDIMHOMTRANSITION_H
17
#define MULTIDIMHOMTRANSITION_H
18
19
#include "transitionStructure.h"
20
#include <iostream>
21
#include <string>
22
23
using namespace
std;
24
38
class
multiDimHomTransition
:
public
transitionStructure
39
{
40
protected
:
41
int
_nbDims
;
42
int
*
_dimSize
;
43
double
*
_p
;
44
double
*
_q
;
46
private
:
47
int
*_mu;
48
double
_r;
49
int
*_fromState;
50
int
*_toState;
51
int
_nbMaxTrans;
52
int
_storedState;
53
int
* _colNum;
54
double
* _colVal;
56
public
:
57
// constructors
65
multiDimHomTransition
(
int
nbDims,
int
* dimSize,
double
* p,
double
* q);
70
~
multiDimHomTransition
();
71
72
public
:
73
// accessors
79
int
dimSize
(
int
d) {
return
_dimSize[d]; };
85
double
p
(
int
d) {
return
_p[d]; };
91
double
q
(
int
d) {
return
_q[d]; };
92
93
public
:
94
// implementation of virtual methods
95
bool
setEntry(
int
i,
int
j,
double
val);
96
double
getEntry(
int
i,
int
j);
97
int
getNbElts(
int
i);
98
int
getCol(
int
i,
int
k);
99
double
getEntryByCol(
int
i,
int
k);
100
discreteDistribution
* getTransDistrib(
int
i);
101
double
rowSum(
int
i);
102
multiDimHomTransition
* copy();
103
multiDimHomTransition
* uniformize();
104
void
evaluateMeasure(
double
* d,
double
* res);
105
void
evaluateMeasure(
discreteDistribution
* d,
discreteDistribution
* res);
106
void
evaluateValue(
double
* v,
double
* res);
107
void
write(FILE* out,
string
format);
108
109
public
:
110
// specific methods
111
discreteDistribution
* getJumpDistribution();
112
113
private
:
114
// specific utilities
115
void
decodeState(
int
index,
int
* buf );
116
void
nextState(
int
* buf );
117
void
decodeTransitions(
int
index );
118
119
};
120
121
#endif // MULTIDIMHOMTRANSITION_H
Generated on Thu May 21 2015 17:06:41 for Marmote Core by
1.8.3.1