4 #include "transitionStructure.h"
55 bool setEntry(
int row,
int col,
double val);
77 int getCol(
int row,
int numCol );
149 void write(FILE* out, std::string format);
160 bool addToEntry(
int row,
int col,
double val);
175 int consolidate(
int i,
int* destinations,
double* values);
178 #endif // SPARSEMATRIX_H
void evaluateMeasure(double *m, double *res)
Sparse vector/matrix multiplication. The result is stored in an array that must be already allocated...
Definition: sparseMatrix.cpp:278
double rowSum(int row)
Summing a row.
Definition: sparseMatrix.cpp:265
sparseMatrix(int size)
Standard constructor for sparse matrices. The internal structures are initialized. The result is the null matrix.
Definition: sparseMatrix.cpp:24
int getCol(int row, int numCol)
Retrieving an low-level entry from the matrix.
Definition: sparseMatrix.cpp:183
bool setEntry(int row, int col, double val)
Inserting an element in the matrix. IMPORTANT NOTE: there is no check for the existence of the column...
Definition: sparseMatrix.cpp:74
void write(FILE *out, std::string format)
Writing a sparse matrix to a file. Several formats could be chosen. Supported formats are: "Ers"...
Definition: sparseMatrix.cpp:388
discreteDistribution * getTransDistrib(int row)
Retrieving the transitions from some state as a discrete distribution.
Definition: sparseMatrix.cpp:215
sparseMatrix * uniformize()
Sparse matrix uniformization. Returns a sparse matrix and sets the uniformization factor...
Definition: sparseMatrix.cpp:340
int getNbElts(int row)
Retrieving a the number of elements on some row.
Definition: sparseMatrix.cpp:166
sparseMatrix * copy()
Sparse matrix copy. This is a straightforward copy. No optimization is performed, viz replicated colu...
Definition: sparseMatrix.cpp:322
~sparseMatrix()
Destructor of the class.
Definition: sparseMatrix.cpp:58
double getEntry(int, int)
Retrieving an entry from the matrix. Takes into account the fact that columns may be replicated: the ...
Definition: sparseMatrix.cpp:151
Abstract class for transition structures. These are structures which describe transitions to one stat...
Definition: transitionStructure.h:17
void evaluateValue(double *v, double *res)
Sparse vector/matrix multiplication. The result is stored in an array that must be already allocated...
Definition: sparseMatrix.cpp:311
bool addToEntry(int row, int col, double val)
Adding a value to an element to the matrix.
Definition: sparseMatrix.cpp:106
Class sparseMatrix: implementation of a transition structure using the sparse matrix data structure...
Definition: sparseMatrix.h:14
int size()
Read accessor for the size of the state space.
Definition: transitionStructure.h:41
The general discrete distribution with finite support.
Definition: discreteDistribution.h:25
double getEntryByCol(int row, int numCol)
Retrieving an low-level entry from the matrix.
Definition: sparseMatrix.cpp:199