![]() |
GemaCoreLib
The GeMA Core library
|
Aux structure used when building sparse matrices with the help of a triplet list. The tripet structure stores 2 ints. More...
#include <gmSparseMatrixTripletData.h>
Public Member Functions | |
GmSparseMatrixTripletData (int lin, int col, double val) | |
Constructor. | |
GmSparseMatrixTripletData (int ptr, int index, double val, bool) | |
Alternate constructor receiving the ptr and the index values. | |
GmSparseMatrixTripletData () | |
Dummy constructor to allow using the structure inside a vector. | |
int | ptr () const |
Returns either the line (CSR) or column (CSC) data depending on the matrix format. | |
int | index () const |
Returns either the column (CSR) or line (CSC) data depending on the matrix format. | |
bool | operator< (const GmSparseMatrixTripletData< T > &other) const |
Compare operator to enable sorting with standard sort routines. Not needed by integer sorting. The order is done first by key[1] and then by key[0]. Comparing a single quint64 is much faster than doing up to 3 comparissons if we would treat key[1] and key[2] separetly. | |
template<> | |
GmSparseMatrixTripletData (int lin, int col, double val) | |
template<> | |
GmSparseMatrixTripletData (int lin, int col, double val) | |
Public Attributes | |
int | _key [2] |
Either column + line (CSR) or line + column (CSC), depending on the matrix format. | |
double | _value |
The triplet value. | |
Aux structure used when building sparse matrices with the help of a triplet list. The tripet structure stores 2 ints.
Templated on the matrix layout type so that we can have specific memory layouts and ptr() / index() implementations for CSR and CSC layouts