A compact self-contained storage for sparse matrices.
More...
#include <geogram/NL/nl_matrix.h>
|
(Note that these are not member functions.)
|
NLAPI void NLAPIENTRY | nlCRSMatrixConstruct (NLCRSMatrix *M, NLuint m, NLuint n, NLuint_big nnz, NLuint nslices) |
| Constructs a new NLCRSMatrix. More...
|
|
NLAPI void NLAPIENTRY | nlCRSMatrixConstructSymmetric (NLCRSMatrix *M, NLuint n, NLuint_big nnz) |
| Constructs a new NLCRSMatrix with symmetric storage. More...
|
|
NLAPI void NLAPIENTRY | nlCRSMatrixConstructPattern (NLCRSMatrix *M, NLuint m, NLuint n) |
| Constructs a new NLCRSMatrix with only the pattern. More...
|
|
NLAPI void NLAPIENTRY | nlCRSMatrixConstructPatternSymmetric (NLCRSMatrix *M, NLuint n) |
| Constructs a new NLCRSMatrix with symmetric storage. More...
|
|
NLAPI NLboolean NLAPIENTRY | nlCRSMatrixLoad (NLCRSMatrix *M, const char *filename) |
| Loads a NLCRSMatrix from a file. More...
|
|
NLAPI NLboolean NLAPIENTRY | nlCRSMatrixSave (NLCRSMatrix *M, const char *filename) |
| Saves a NLCRSMatrix into a file. More...
|
|
NLAPI NLuint_big NLAPIENTRY | nlCRSMatrixNNZ (NLCRSMatrix *M) |
| Gets the number of non-zero coefficient in an NLCRSMatrix. More...
|
|
NLAPI NLMatrix NLAPIENTRY | nlCRSMatrixNewFromSparseMatrix (NLSparseMatrix *M) |
| Creates a compressed row storage matrix from a dynamic sparse matrix. More...
|
|
NLAPI NLMatrix NLAPIENTRY | nlCRSMatrixNewFromSparseMatrixSymmetric (NLSparseMatrix *M) |
| Creates a compressed row storage matrix from a dynamic sparse matrix. More...
|
|
A compact self-contained storage for sparse matrices.
Unlike with NLSparseMatrix, it is not possible to add new coefficients in an NLCRSMatrix.
Definition at line 278 of file nl_matrix.h.
◆ nlCRSMatrixConstruct()
Constructs a new NLCRSMatrix.
- Parameters
-
[in,out] | M | pointer to an uninitialized NLCRSMatrix |
[in] | m | number of rows |
[in] | n | number of columns |
[in] | nnz | number of non-zero coefficientsz |
[in] | nslices | number of slices, used by parallel spMv (typically, nslices = number of cores) |
◆ nlCRSMatrixConstructPattern()
Constructs a new NLCRSMatrix with only the pattern.
This function should be used when the number of coefficients in each row is not known in advance.
- Parameters
-
[in,out] | M | pointer to an uninitialized NLCRSMatrix |
[in] | m | number of rows |
[in] | n | number of columns |
◆ nlCRSMatrixConstructPatternSymmetric()
NLAPI void NLAPIENTRY nlCRSMatrixConstructPatternSymmetric |
( |
NLCRSMatrix * |
M, |
|
|
NLuint |
n |
|
) |
| |
|
related |
Constructs a new NLCRSMatrix with symmetric storage.
This function should be used when the number of coefficients in each row is not known in advance.
- Parameters
-
[in,out] | M | pointer to an uninitialized NLCRSMatrix |
[in] | n | number of rows and columns |
[in] | nnz | number of non-zero coefficients |
◆ nlCRSMatrixConstructSymmetric()
Constructs a new NLCRSMatrix with symmetric storage.
- Parameters
-
[in,out] | M | pointer to an uninitialized NLCRSMatrix |
[in] | n | number of rows and columns |
[in] | nnz | number of non-zero coefficients |
◆ nlCRSMatrixLoad()
Loads a NLCRSMatrix from a file.
- Parameters
-
[out] | M | a pointer to an uninitialized NLCRSMatriix |
[in] | filename | the name of the file |
- Return values
-
NL_TRUE | on success |
NL_FALSE | on error |
◆ nlCRSMatrixNewFromSparseMatrix()
Creates a compressed row storage matrix from a dynamic sparse matrix.
The matrix M
should have stored rows. If M
has symmetric storage, then the constructed matrix also has symmetric storage.
- Parameters
-
[in] | M | the dynamic sparse matrix. |
- Returns
- a pointer to the created NLCRSMatrix
◆ nlCRSMatrixNewFromSparseMatrixSymmetric()
Creates a compressed row storage matrix from a dynamic sparse matrix.
The matrix M
should have stored rows. It is supposed to be symmetric. If it does not have symmetric storage, then its upper triangular part is ignored.
- Parameters
-
[in] | M | the dynamic sparse matrix. |
- Returns
- a pointer to the created NLCRSMatrix
◆ nlCRSMatrixNNZ()
Gets the number of non-zero coefficient in an NLCRSMatrix.
- Parameters
-
- Returns
- the number of non-zero coefficients in
M
◆ nlCRSMatrixSave()
Saves a NLCRSMatrix into a file.
- Parameters
-
[in] | M | a pointer to the NLCRSMatriix |
[in] | filename | the name of the file |
- Return values
-
NL_TRUE | on success |
NL_FALSE | on error |
◆ type
Matrix type.
One of NL_MATRIX_DYNAMIC, NL_MATRIX_CRS, NL_MATRIX_SUPERLU_EXT, NL_CHOLDMOD_MATRIX_EXT
Definition at line 294 of file nl_matrix.h.
The documentation for this struct was generated from the following file: