24#ifndef _GEMA_SUITESPARSE_MATRIX_H_
25#define _GEMA_SUITESPARSE_MATRIX_H_
32template<
class IndexType>
43 static cholmod_sparse*
newCholmodMatrix(
int nlin,
int ncol, IndexType nnz,
double* values, IndexType* ptrs, IndexType* indices);
45 virtual void clear(
bool keepSparseLayout);
46 virtual void clearLineAndColumnSet(
const QVector<int>& indexList,
bool setDiagonal,
bool keepSparseLayout);
47 virtual void ensureDiagonal();
58 static void initCholMatrixData(cholmod_sparse* m, IndexType nnz,
double* values, IndexType* ptrs, IndexType* indices);
60 cholmod_sparse _cholMatrix;
A class for wrapping up a suite sparse matrix as a cholmod_sparse structure.
Definition suiteSparseMatrix.h:34
cholmod_sparse * cholmodMatrix()
Returns the "SuiteSparse"Cholmod" matrix wrapped by this class.
Definition suiteSparseMatrix.h:41
SuiteSparseMatrix(int nlin, int ncol, const SuiteSparseMatrix< IndexType > *sharedLayout, GmSparseMatrixOptions options)
Constructor for the square matrix used by the SuiteSparse set of solvers. If sharedLayout is differen...
Definition suiteSparseMatrix.cpp:38
void updateCholMatrix()
Updates the number of non - zero values + value and index pointers in the CHOLMOD matrix from the spa...
Definition suiteSparseMatrix.cpp:197
virtual ~SuiteSparseMatrix()
Destructor.
Definition suiteSparseMatrix.cpp:62
static void initCholMatrix(cholmod_sparse *m, int nlin, int ncol)
Initializes the given matrix with the number of lines / columns & other constant values.
Definition suiteSparseMatrix.cpp:151
virtual void matrixLayoutReady()
Allocates space for matrix values and build the LIS wrapper over matrix vectors.
Definition suiteSparseMatrix.cpp:69
static void initCholMatrixData(cholmod_sparse *m, IndexType nnz, double *values, IndexType *ptrs, IndexType *indices)
Initializes the given matrix with the layout + data values.
Definition suiteSparseMatrix.cpp:181
void clearCholMatrix()
Clears the information stored in the SuperLU matrix.
Definition suiteSparseMatrix.cpp:209
static cholmod_sparse * newCholmodMatrix(int nlin, int ncol, IndexType nnz, double *values, IndexType *ptrs, IndexType *indices)
Creates a new cholmod_sparse structure filled with the given data. No space is allocated....
Definition suiteSparseMatrix.cpp:138
void SuiteSparseFillCholmodVector(cholmod_dense *v, int nlin, double *values)
Fills the given dense matrix with data from the given vector. No space is allocated....
Definition suiteSparseMatrix.cpp:223