![]() |
GemaCoreLib
The GeMA Core library
|
Utilitary functions for working with doubles. More...
Go to the source code of this file.
Namespaces | |
GmMatrixUtils | |
Groups utilitary routines for working with matrices. | |
Typedefs | |
typedef arma::mat | GmMatrix |
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix. | |
Functions | |
void | GmMatrixUtils::fill (GmMatrix &m, const double *data, int nlin, int ncol) |
Copy the contents of data to matrix m. If m size is different from nlin, ncol the matrix is resized. Assumes that data is layed out in COLUMN MAJOR FORMAT. | |
void | GmMatrixUtils::fillLine (GmMatrix &m, const double *data, int lin) |
Fills the specified line of a matrix m with the specified data. | |
void | GmMatrixUtils::fillColumn (GmMatrix &m, const double *data, int col) |
Fills the specified column of a matrix m with the specified data. | |
void | GmMatrixUtils::setMatrixMemory (GmMatrix &m, double *data, int nlin, int ncol) |
Updates the memory area used internally by a matrix. DANGEROUS. Should be used only by the bold ones who KNOWS what they are doing. More... | |
void | GmMatrixUtils::resetMatrixMemory (GmMatrix &m) |
Updates a matrix that was prepared with setMatrixMemory() to a common empty matrix. If the matrix is already a common matrix, resets it AND sets its memory pointer to NULL to become compatible with the checks by setMatrixMemory() | |
bool | GmMatrixUtils::hasSharedMemory (GmMatrix &m) |
Is this matrix operating over a shared memory (set by setMatrixMemory())? | |
void | GmMatrixUtils::setMatrixSize (GmMatrix &m, int nlin, int ncol) |
Updates the logical matrix size WITHOUT changin the used memory area. DANGEROUS. Should be used only by the bold ones who KNOWS what they are doing. More... | |
void | GmMatrixUtils::print (const GmMatrix &m, const GmLogCategory &logger, GmLogLevel level, int fieldWidth, char format, int precision) |
Prints the matrix using the specified logger, level and precision fields. | |
QString | GmMatrixUtils::toString (const GmMatrix &m, int fieldWidth, char format, int precision) |
Serializes the matrix to a string using the specified precision fields. Lines are surrounded by [] and values separated by ', '. | |
QString | GmMatrixUtils::toColMajorString (const GmMatrix &m, int fieldWidth, char format, int precision) |
Serializes the matrix to a "linear" string, using the specified precision fields, with values ordered in column major format. Values are separated by ', '. | |
void | GmMatrixUtils::fillFromLuaTable (GmMatrix &m, LuaTable &t) |
Resizes and fills the matrix m to receive the data stored in a lua table. More... | |
bool | GmMatrixUtils::fillFromLuaTable (GmMatrix &m, LuaTable &t, int nlin, int ncol) |
Resizes and fills the matrix m to receive the data stored in a lua table. More... | |
bool | GmMatrixUtils::updateFromLuaTable (GmMatrix &m, LuaTable &t) |
Updates the matrix m with the data stored in a lua table. The matrix size is left unchanged. More... | |
Utilitary functions for working with doubles.
Utilitary functions for working with matrices.