GemaCoreLib
The GeMA Core library
Classes | Typedefs | Enumerations
gmSparseMatrixLayout.h File Reference

Declaration of the GmSparseMatrixLayout structure and its derived types. More...

#include "gmCoreConfig.h"
#include <armadillo>
#include <QObject>
Include dependency graph for gmSparseMatrixLayout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GmSparseMatrixLayout
 A base structure for storing layout data for sparse marices (fill structure or non zero positions). The matrix data itself is not stored, allowing for the layout to be shared among several matrices if needed. More...
 
struct  GmCSxSparseMatrixLayout< IndexType, T >
 A structure for storing a matrix layout in either CSR or CSC format. The template type defines the type that will be used for storing indices (the Armadillo library, for example, works with a 64 bits index while the LIS library works with a 32 bits index). More...
 

Typedefs

typedef GmCSxSparseMatrixLayout< int, GM_CSR_SPARSE_FORMATGmCSRSparseMatrixLayout
 CSR layout with 32 bits integer index.
 
typedef GmCSxSparseMatrixLayout< arma::uword, GM_CSC_SPARSE_FORMATGmCSCArmadilloSparseMatrixLayout
 CSC layout with 64 bits integer index. More...
 

Enumerations

enum  GmSparseMatrixLayoutTypes { GM_CSC_SPARSE_FORMAT, GM_CSR_SPARSE_FORMAT }
 Supported sparse matrix types by GmSparseMatrixLayout sub-classes. More...
 

Detailed Description

Declaration of the GmSparseMatrixLayout structure and its derived types.

Author
Carlos Augusto Teixeira Mendes
Date
november, 2018

Typedef Documentation

◆ GmCSCArmadilloSparseMatrixLayout

CSC layout with 64 bits integer index.

If ever changing arma type to a 32-bits value, please make sure to review the code in GmVectorCSxSparseMatrixLayoutBuilder. This will open the possibility of reusing the builder internal vector as the layout index vector. Care will also be needed in that case with allocating space for the arma sentinell value in the builder vector.

Enumeration Type Documentation

◆ GmSparseMatrixLayoutTypes

Supported sparse matrix types by GmSparseMatrixLayout sub-classes.

Enumerator
GM_CSC_SPARSE_FORMAT 

Data is stored in "Compressed Sparse Column" format.

GM_CSR_SPARSE_FORMAT 

Data is stored in "Compressed Sparse Row" (or old Yale) format.