MaxPlus::Matrix Class Reference
#include <mpmatrix.h>
Public Member Functions | |
Matrix (unsigned int size) | |
~Matrix () | |
unsigned int | getSize (void) const |
MPTime | get (unsigned int row, unsigned int column) const |
void | put (unsigned int row, unsigned int column, MPTime value) |
void | paste (unsigned int top_row, unsigned int left_column, const Matrix *pastedMatrix) |
Matrix * | createCopy () const |
Matrix * | getTransposedCopy () const |
Matrix * | getSubMatrix (const list< unsigned int > indices) const |
void | toString (CString &outString, double scale=1.0) const |
Matrix * | add (MPTime increase) const |
void | add (MPTime increase, Matrix *result) const |
void | maximum (const Matrix *matB, Matrix *result) |
Vector * | mpmultiply (const Vector &v) const |
Matrix & | operator+= (MPTime increase) |
Matrix & | operator-= (MPTime decrease) |
Matrix & | incrementalMaximum (const Matrix *matrix) |
MPTime | largestFiniteElement () const |
MPTime | minimalFiniteElement () const |
Matrix * | plusClosureMatrix (MPTime posCycleThre) const |
Matrix * | starClosureMatrix (MPTime posCycleThre) const |
Matrix * | allPairLongestPathMatrix (MPTime posCycleThre, bool implyZeroSelfEdges) const |
Private Member Functions | |
Matrix (const Matrix &) | |
Matrix & | operator= (const Matrix &) |
Matrix () | |
Private Attributes | |
vector< MPTime > | table |
unsigned int | sz |
Constructor & Destructor Documentation
MaxPlus::Matrix::Matrix | ( | unsigned int | size | ) |
Construct a Maxplus matrix of size by size
References MaxPlus::MP_MINUSINFINITY, sz, and table.
MaxPlus::Matrix::~Matrix | ( | ) |
Destructor of MaxPlus matrix
MaxPlus::Matrix::Matrix | ( | const Matrix & | ) | [private] |
MaxPlus::Matrix::Matrix | ( | ) | [private] |
Referenced by add(), createCopy(), getSubMatrix(), and getTransposedCopy().
Member Function Documentation
Matrix addition of scalar.
References getSize(), and Matrix().
Referenced by operator+=(), and operator-=().
Matrix * MaxPlus::Matrix::allPairLongestPathMatrix | ( | MPTime | posCycleThre, | |
bool | implyZeroSelfEdges | |||
) | const |
Matrix all pair longest path.
References createCopy(), get(), getSize(), MaxPlus::MP_MAX(), MaxPlus::MP_MINUSINFINITY, put(), toString(), and v.
Referenced by plusClosureMatrix(), and starClosureMatrix().
Matrix * MaxPlus::Matrix::createCopy | ( | ) | const |
Matrix copy.
References getSize(), Matrix(), and table.
Referenced by allPairLongestPathMatrix().
MPTime MaxPlus::Matrix::get | ( | unsigned int | row, | |
unsigned int | column | |||
) | const |
Get an entry from the matrix. Row and column index must be between 0 and size-1
References getSize(), and table.
Referenced by allPairLongestPathMatrix(), MaxPlusAnalysis::Exploration::convertToHSDFByMP(), maximum(), and paste().
unsigned int MaxPlus::Matrix::getSize | ( | void | ) | const [inline] |
References sz.
Referenced by add(), allPairLongestPathMatrix(), MaxPlusAnalysis::Exploration::convertToHSDFByMP(), createCopy(), get(), getTransposedCopy(), largestFiniteElement(), maximum(), minimalFiniteElement(), mpmultiply(), paste(), put(), and toString().
Matrix * MaxPlus::Matrix::getSubMatrix | ( | const list< unsigned int > | indices | ) | const |
Make submatrix with indices in list.
References Matrix(), put(), and v.
Referenced by FSMSADF::GraphConversion::computeMaxPlusMatricesFromScenarios().
Matrix * MaxPlus::Matrix::getTransposedCopy | ( | ) | const |
MPTime MaxPlus::Matrix::largestFiniteElement | ( | ) | const |
Matrix return largest element.
References c, getSize(), and MaxPlus::MP_MINUSINFINITY.
Matrix maximum with existing result matrix.
References c, get(), getSize(), MaxPlus::MP_MAX(), and put().
Referenced by incrementalMaximum().
MPTime MaxPlus::Matrix::minimalFiniteElement | ( | ) | const |
Matrix get minimal element
References c, getSize(), MaxPlus::MP_MIN(), and MaxPlus::MP_MINUSINFINITY.
mpmultiply() Matrix-vector multiplication.
References MaxPlus::Vector::get(), MaxPlus::Vector::getSize(), getSize(), MaxPlus::MP_MAX(), MaxPlus::MP_MINUSINFINITY, MaxPlus::MP_PLUS(), and MaxPlus::Vector::put().
void MaxPlus::Matrix::paste | ( | unsigned int | top_row, | |
unsigned int | left_column, | |||
const Matrix * | pastedMatrix | |||
) |
Matrix plus closure.
References allPairLongestPathMatrix().
void MaxPlus::Matrix::put | ( | unsigned int | row, | |
unsigned int | column, | |||
MPTime | value | |||
) |
Put a value in the matrix. Row and column index must be between 0 and size-1
References getSize(), and table.
Referenced by add(), allPairLongestPathMatrix(), MaxPlusAnalysis::Exploration::convertToMaxPlusMatrix(), getSubMatrix(), getTransposedCopy(), maximum(), and paste().
Matrix star closure.
References allPairLongestPathMatrix().
void MaxPlus::Matrix::toString | ( | CString & | outString, | |
double | scale = 1.0 | |||
) | const |
Matrix to string.
References getSize(), and MaxPlus::timeToString().
Referenced by allPairLongestPathMatrix().
Member Data Documentation
unsigned int MaxPlus::Matrix::sz [private] |
vector<MPTime> MaxPlus::Matrix::table [private] |
Referenced by createCopy(), get(), Matrix(), and put().
The documentation for this class was generated from the following files: