![]() |
GemaCoreLib
The GeMA Core library
|
Declaration of the GmMatrix class. More...
#include "gmCoreConfig.h"
#include <armadillo>
#include <QMetaType>
#include "gmMatrixUtils.h"
#include <assert.h>
Go to the source code of this file.
Classes | |
class | GmCRMatrix |
An auxiliary matrix WRAPPER that binds the matrix to a CONST memory area with data already inicialized and interpreted in COLUMN MAJOR FORMAT. More... | |
Macros | |
#define | GM_MATRIX_DEFINED |
We are going to use an Armadillo matrix as our base matrix interface. More... | |
#define | GM_MATRIX_IS_COLUMN_MAJOR |
#define | DECLARE_REF_MATRIX(x, ptr, lin, col) GmMatrix x((ptr), (lin), (col), false, true) |
An auxiliary macro to help correctly define a matrix that binds itself to a memory area with data already initialized and interpreted in COLUMN MAJOR FORMAT. More... | |
Typedefs | |
typedef arma::mat | GmMatrix |
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix. | |
typedef arma::subview_col< double > | GmMatrixCol |
A subcolumn view of a matrix. | |
Functions | |
Q_DECLARE_METATYPE (GmMatrix) | |
Declaration of the GmMatrix class.
#define DECLARE_REF_MATRIX | ( | x, | |
ptr, | |||
lin, | |||
col | |||
) | GmMatrix x((ptr), (lin), (col), false, true) |
An auxiliary macro to help correctly define a matrix that binds itself to a memory area with data already initialized and interpreted in COLUMN MAJOR FORMAT.
This is a very fast option, that doesn't allocate any extra memory and is very usefull to use matrix operations over a previous allocated area.
This matrix cannot be resized in any way. The memory referenced by the matrix should be available through the entire lifetime of the matrix.
IMPORTANT: Any COPY of this matrix will make a COPY of the data and won't point to the original memory area anymore.
#define GM_MATRIX_DEFINED |
We are going to use an Armadillo matrix as our base matrix interface.
The typedef GmMatrix is used to make life a little bit easier if we ever wish to exchange our base linear algebra package.