GemaCoreLib
The GeMA Core library
Classes | Macros | Typedefs | Functions
gmVector.h File Reference

Declaration of the GmVector class. More...

#include "gmCoreConfig.h"
#include <armadillo>
#include <QMetaType>
#include "gmVectorUtils.h"
#include <assert.h>
Include dependency graph for gmVector.h:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

Declaration of the GmVector class.

Author
Carlos Augusto Teixeira Mendes
Date
july, 2015

Macro Definition Documentation

◆ DECLARE_REF_VECTOR

#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.