roadrunner
2.6.0
Fast simulator for SBML models
|
A basic local matrix class, based on the libstruct version. More...
#include <Matrix.h>
Public Member Functions | |
Matrix (ls::Matrix< T > &matrix) | |
Constructor for creating a Matrix<T> from a ls::Matrix<T> | |
Matrix (ls::Matrix< T > *matrix) | |
Constructor for creating a Matrix<T> from a ls::Matrix<T> | |
bool | operator== (Matrix< T > &other) |
Element-wise equality operator to compare a Matrix<T> with another Matrix<T> More... | |
bool | operator!= (Matrix< T > &other) |
inequality operators | |
bool | almostEquals (Matrix< double > &other, const double &tolerance) |
Element-wise comparison between this Matrix<double> with another. More... | |
Matrix< T > | mult (Matrix< T > matrix) |
matrix multiplication operator | |
bool | empty () |
indicator method for empty Matrix. More... | |
void | sortRowsByLabels () |
Reorder Matrix rows such that row names are in alphabetical order. | |
void | sortColsByLabels () |
Reorder Matrix cols such that col names are in alphabetical order. | |
void | deleteRow (int which) |
delete row More... | |
void | deleteRow (const std::string &which) |
delete a row with the label More... | |
void | deleteCol (int which) |
delete col More... | |
void | deleteCol (const std::string &which) |
delete a col with the label More... | |
A basic local matrix class, based on the libstruct version.
bool rr::Matrix< T >::almostEquals | ( | Matrix< double > & | other, |
const double & | tolerance | ||
) |
Element-wise comparison between this Matrix<double> with another.
Element-wise compareison between this Matrix<double> with another.
other | Matrix<double> |
other | Matrix<double> |
tolerance | the tolerance to use between the real and expected values. |
void rr::Matrix< T >::deleteCol | ( | const std::string & | which | ) |
delete a col with the label
which | . |
interally uses deleteCol(int) overload after locating the index of the correct col to remove.
which | will be removed. |
void rr::Matrix< T >::deleteCol | ( | int | which | ) |
delete col
which | from the matrix. |
memory isn't actually reclaimed nor the array resized. Instead the elements of the array to be removed are shifted one by one to the far right of the array that underlies the matrix. The _Col member variable is decremented so the additional elements are hidden from user.
void rr::Matrix< T >::deleteRow | ( | const std::string & | which | ) |
delete a row with the label
which | . |
interally uses deleteRow(int) overload after locating the index of the correct row to remove.
which | will be removed. |
void rr::Matrix< T >::deleteRow | ( | int | which | ) |
delete row
which | from the matrix. |
memory isn't actually reclaimed nor the array resized. Instead the elements of the array to be removed are shifted one by one to the far right of the array that underlies the matrix. The _Row member variable is decremented so the additional elements are hidden from user.
If row is the last row, there's no need to actually do any deleting. Instead we just keep the items there, but reduce the size of the row. Users are only exposed to the correct set of rows.
bool rr::Matrix< T >::empty |
indicator method for empty Matrix.
bool rr::Matrix< T >::operator== | ( | Matrix< T > & | other | ) |
Element-wise equality operator to compare a Matrix<T> with another Matrix<T>