![]() |
GemaCoreLib
The GeMA Core library
|
Declaration of the GmVector class. More...
#include "gmCoreConfig.h"
#include <armadillo>
#include <QMetaType>
#include "gmVectorUtils.h"
#include <assert.h>
Go to the source code of this file.
Classes | |
class | GmCRVector |
An auxiliary vector WRAPPER that binds the vector to a CONST memory area with data already initialized. More... | |
Macros | |
#define | GM_VECTOR_DEFINED |
Typedef for an Armadillo (column) vector (might also be defined by gmVectorUtils) | |
#define | DECLARE_REF_VECTOR(x, ptr, lin) GmVector x((ptr), (lin), false, true) |
An auxiliary macro to help correctly define a vector that binds itself to a memory area with data already initialized. More... | |
Typedefs | |
typedef arma::vec | GmVector |
The basic type for a GeMA vector object. Currently based on an Armadillo vector. | |
Functions | |
Q_DECLARE_METATYPE (GmVector) | |
Declaration of the GmVector class.
#define DECLARE_REF_VECTOR | ( | x, | |
ptr, | |||
lin | |||
) | GmVector x((ptr), (lin), false, true) |
An auxiliary macro to help correctly define a vector that binds itself to a memory area with data already initialized.
This is a very fast option, that doesn't allocate any extra memory and is very usefull to use vector operations over a previous allocated area.
This vector cannot be resized in any way. The memory referenced by the vector should be available through the entire lifetime of the vector.
IMPORTANT: Any COPY of this vector will make a COPY of the data and won't point to the original memory area anymore.