Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
|
Public Member Functions | |
eventMixture (int size, int nbEvents, double *probas, std::string *names, int **transitions) | |
Constructor from arrays. More... | |
eventMixture (sparseMatrix *spMat) | |
Contruction from a sparse matrix. More... | |
~eventMixture () | |
Destructor of the class. More... | |
int | nbEvents () |
Read accessor for the number of events. More... | |
double | eventProba (int e) |
Read accessor for the probabilities associated to each event. More... | |
bool | setEntry (int i, int j, double val) |
Method to set the value associated with some transition. Not applicable here. More... | |
double | getEntry (int i, int j) |
Method to get the value associated with some transition. When state parameters are out of bounds, the returned value should be 0. More... | |
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 number of actually possible transitions from that state. More... | |
int | getCol (int i, int k) |
Method to get the number of the state corresponding to transition number k in the list of possible transitions from some state i. More... | |
double | getEntryByCol (int i, int k) |
Method to get the value attached to transition number k in the list of possible transitions from some state i. More... | |
discreteDistribution * | getTransDistrib (int i) |
Method to get the transition from some state as a probability distribution. More... | |
double | rowSum (int i) |
Sum of entries on some row i. Always 1.0 since this is a discrete-time transition structure. More... | |
eventMixture * | copy () |
Copying a transition structure. More... | |
eventMixture * | uniformize () |
Uniformizing a transition structure. Since the origin structure is already of discrete-time type, a copy is returned. More... | |
void | evaluateMeasure (double *pi, double *res) |
Computing the action of the transition structure on some measure, the measure being represented as a vector of real numbers. This corresponds to the multiplication vector/matrix, the row vector being interpreted as a signed measure. More... | |
void | evaluateMeasure (discreteDistribution *d, discreteDistribution *res) |
void | evaluateValue (double *v, double *res) |
Computing the action of the transition structure on some vector of values. This corresponds to the multiplication matrix/vector, the column vector being interpreted as a vector of values attached to the states. More... | |
void | write (FILE *out, std::string format) |
Output method for a transition structure. More... | |
eventMixture (int size, int nbEvents, double *probas, std::string *names, int **transitions) | |
Constructor from arrays. More... | |
eventMixture (sparseMatrix *spMat) | |
Contruction from a sparse matrix. More... | |
~eventMixture () | |
Destructor of the class. More... | |
int | nbEvents () |
Read accessor for the number of events. More... | |
double | eventProba (int e) |
Read accessor for the probabilities associated to each event. More... | |
bool | setEntry (int i, int j, double val) |
Method to set the value associated with some transition. More... | |
double | getEntry (int i, int j) |
Method to get the value associated with some transition. When state parameters are out of bounds, the returned value should be 0. More... | |
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 number of actually possible transitions from that state. More... | |
int | getCol (int i, int k) |
Method to get the number of the state corresponding to transition number k in the list of possible transitions from some state i. More... | |
double | getEntryByCol (int i, int k) |
Method to get the value attached to transition number k in the list of possible transitions from some state i. More... | |
discreteDistribution * | getTransDistrib (int i) |
Method to get the transition from some state as a probability distribution. More... | |
double | rowSum (int i) |
Calculating the sum of values corresponding to transitions from some state. More... | |
eventMixture * | copy () |
Copying a transition structure. More... | |
eventMixture * | uniformize () |
Uniformizing a transition structure. The structure should be of continuous time type. The resulting one will be of discrete time type. If uniformization fails, a NULL pointer should be returned. If the origin structure is already of discrete-time type, a copy should be returned. More... | |
void | evaluateMeasure (double *pi, double *res) |
Computing the action of the transition structure on some measure, the measure being represented as a vector of real numbers. This corresponds to the multiplication vector/matrix, the row vector being interpreted as a signed measure. More... | |
void | evaluateMeasure (discreteDistribution *d, discreteDistribution *res) |
Computing the action of the transition structure on some probability distribution. More... | |
void | evaluateValue (double *v, double *res) |
Computing the action of the transition structure on some vector of values. This corresponds to the multiplication matrix/vector, the column vector being interpreted as a vector of values attached to the states. More... | |
void | write (FILE *out, std::string format) |
Output method for a transition structure. More... | |
![]() | |
virtual | ~transitionStructure () |
Destructor of the class. More... | |
int | size () |
Read accessor for the size of the state space. More... | |
timeType | type () |
Read accessor for the time type. More... | |
double | uniformizationRate () |
Read accessor for the uniformization rate. Relevant mostly for discrete-time structures created by uniformization of a continuous-time one. More... | |
void | setType (timeType t) |
Write accessor for the time type. More... | |
void | setUniformizationRate (double rate) |
Write accessor for the uniformization rate. More... | |
bool | readEntry (FILE *input) |
Reading from a file, and adding an element to the matrix. The field must be in the form "row column value" with blank spaces as separators. More... | |
virtual | ~transitionStructure () |
Destructor of the class. More... | |
int | size () |
Read accessor for the size of the state space. More... | |
timeType | type () |
Read accessor for the time type. More... | |
double | uniformizationRate () |
Read accessor for the uniformization rate. Relevant mostly for discrete-time structures created by uniformization of a continuous-time one. More... | |
void | setType (timeType t) |
Write accessor for the time type. More... | |
void | setUniformizationRate (double rate) |
Write accessor for the uniformization rate. More... | |
bool | readEntry (FILE *input) |
Reading from a file, and adding an element to the matrix. The field must be in the form "row column value" with blank spaces as separators. More... | |
Additional Inherited Members | |
![]() | |
int | consolidate (int i, int *destinations, double *values) |
Method to consolidate (aggregate) transition probabilities from a given state. The method returns the number of different destination states, and modifies the arrays which will containt the lists of destinations and the corresponding probabilities. These arrays must have been allocated beforehand, with a size large enough to handle safely all possibilities. More... | |
int | consolidate (int i, int *destinations, double *values) |
Method to consolidate (aggregate) transition probabilities from a given state. The method returns the number of different destination states, and modifies the arrays which will containt the lists of destinations and the corresponding probabilities. These arrays must have been allocated beforehand, with a size large enough to handle safely all possibilities. More... | |
![]() | |
timeType | _type |
the time type of the structure: discrete or continuous. More... | |
long int | _size |
size of the state space. More... | |
double | _uniformizationRate |
value related to the uniformization procedure. More... | |
eventMixture::eventMixture | ( | int | size, |
int | nbEvents, | ||
double * | probas, | ||
std::string * | names, | ||
int ** | transitions | ||
) |
Constructor from arrays.
size | the number of states |
nbEvents | the number of different events |
probas | the array of probabilities. This array is copied |
names | the names of events. This array is copied |
transitions | the array of state-to-state mappings. This array is not copied. |
eventMixture::eventMixture | ( | sparseMatrix * | spMat | ) |
Contruction from a sparse matrix.
spMat | the sparse matrix to convert into an event mixture |
eventMixture::~eventMixture | ( | ) |
Destructor of the class.
eventMixture::eventMixture | ( | int | size, |
int | nbEvents, | ||
double * | probas, | ||
std::string * | names, | ||
int ** | transitions | ||
) |
Constructor from arrays.
size | the number of states |
nbEvents | the number of different events |
probas | the array of probabilities. This array is copied |
names | the names of events. This array is copied |
transitions | the array of state-to-state mappings. This array is not copied. |
eventMixture::eventMixture | ( | sparseMatrix * | spMat | ) |
Contruction from a sparse matrix.
spMat | the sparse matrix to convert into an event mixture |
eventMixture::~eventMixture | ( | ) |
Destructor of the class.
|
virtual |
|
virtual |
|
virtual |
Computing the action of the transition structure on some measure, the measure being represented as a vector of real numbers. This corresponds to the multiplication vector/matrix, the row vector being interpreted as a signed measure.
d | the measure to evaluate |
res | the resulting measure |
Reimplemented from transitionStructure.
|
virtual |
Reimplemented from transitionStructure.
|
virtual |
Computing the action of the transition structure on some measure, the measure being represented as a vector of real numbers. This corresponds to the multiplication vector/matrix, the row vector being interpreted as a signed measure.
d | the measure to evaluate |
res | the resulting measure |
Reimplemented from transitionStructure.
|
virtual |
Computing the action of the transition structure on some probability distribution.
d | the distribution to evaluate |
res | the resulting distribution |
Reimplemented from transitionStructure.
|
virtual |
Computing the action of the transition structure on some vector of values. This corresponds to the multiplication matrix/vector, the column vector being interpreted as a vector of values attached to the states.
v | the vector of values to evaluate |
res | the resulting vector |
Implements transitionStructure.
|
virtual |
Computing the action of the transition structure on some vector of values. This corresponds to the multiplication matrix/vector, the column vector being interpreted as a vector of values attached to the states.
v | the vector of values to evaluate |
res | the resulting vector |
Implements transitionStructure.
|
inline |
Read accessor for the probabilities associated to each event.
e | the event index |
|
inline |
Read accessor for the probabilities associated to each event.
e | the event index |
|
virtual |
Method to get the number of the state corresponding to transition number k in the list of possible transitions from some state i.
i | the origin state |
k | the index of transition from state i |
Implements transitionStructure.
|
virtual |
Method to get the number of the state corresponding to transition number k in the list of possible transitions from some state i.
i | the origin state |
k | the index of transition from state i |
Implements transitionStructure.
|
virtual |
Method to get the value associated with some transition. When state parameters are out of bounds, the returned value should be 0.
i | the origin state |
j | the destination state |
Implements transitionStructure.
|
virtual |
Method to get the value associated with some transition. When state parameters are out of bounds, the returned value should be 0.
i | the origin state |
j | the destination state |
Implements transitionStructure.
|
virtual |
Method to get the value attached to transition number k in the list of possible transitions from some state i.
i | the origin state |
k | the index of the transition from state i |
Implements transitionStructure.
|
virtual |
Method to get the value attached to transition number k in the list of possible transitions from some state i.
i | the origin state |
k | the index of the transition from state i |
Implements transitionStructure.
|
virtual |
Method to get the number of non-zero entries in a transition from some state. This can be seen as the number of actually possible transitions from that state.
i | the origin state |
Implements transitionStructure.
|
virtual |
Method to get the number of non-zero entries in a transition from some state. This can be seen as the number of actually possible transitions from that state.
i | the origin state |
Implements transitionStructure.
|
virtual |
Method to get the transition from some state as a probability distribution.
i | the origin state |
Implements transitionStructure.
|
virtual |
Method to get the transition from some state as a probability distribution.
i | the origin state |
Implements transitionStructure.
|
inline |
Read accessor for the number of events.
|
inline |
Read accessor for the number of events.
|
virtual |
Sum of entries on some row i. Always 1.0 since this is a discrete-time transition structure.
i | the row to be summed |
Implements transitionStructure.
|
virtual |
Calculating the sum of values corresponding to transitions from some state.
i | the state |
Implements transitionStructure.
|
virtual |
Method to set the value associated with some transition. Not applicable here.
i | the origin state |
j | the destination state |
val | the value attached to the transition |
Implements transitionStructure.
|
virtual |
Method to set the value associated with some transition.
i | the origin state |
j | the destination state |
val | the value attached to the transition |
Implements transitionStructure.
|
virtual |
Uniformizing a transition structure. Since the origin structure is already of discrete-time type, a copy is returned.
Implements transitionStructure.
|
virtual |
Uniformizing a transition structure. The structure should be of continuous time type. The resulting one will be of discrete time type. If uniformization fails, a NULL pointer should be returned. If the origin structure is already of discrete-time type, a copy should be returned.
Implements transitionStructure.
|
virtual |
Output method for a transition structure.
out | the file descriptor to which the structure should be written. |
format | the format/language to be used. |
Implements transitionStructure.
|
virtual |
Output method for a transition structure.
out | the file descriptor to which the structure should be written. |
format | the format/language to be used. |
Implements transitionStructure.