Geogram Version 1.8.5
A programming library of geometric algorithms
Loading...
Searching...
No Matches
NLSparseMatrix Struct Reference

Public Attributes

NLuint m
 number of rows
 
NLuint n
 number of columns
 
NLenum type
 Matrix type.
 
NLDestroyMatrixFunc destroy_func
 destructor
 
NLMultMatrixVectorFunc mult_func
 Matrix x vector product.
 
NLuint diag_size
 number of elements in the diagonal
 
NLuint diag_capacity
 Number of elements allocated to store the diagonal.
 
NLenum storage
 indicates what is stored in this matrix
 
NLRowColumnrow
 the rows if (storage & NL_MATRIX_STORE_ROWS), size = m, NULL otherwise
 
NLRowColumncolumn
 the columns if (storage & NL_MATRIX_STORE_COLUMNS), size = n, NULL otherwise
 
NLdoublediag
 the diagonal elements, size = diag_size
 
NLuint row_capacity
 Number of row descriptors allocated in the row array.
 
NLuint column_capacity
 Number of column descriptors allocated in the column array.
 

Related Symbols

(Note that these are not member symbols.)

NLAPI void NLAPIENTRY nlCRSMatrixAdd (NLCRSMatrix *M, NLuint i, NLuint j, NLdouble value)
 Adds a coefficient to an NLSparseMatrix.
 
#define NL_MATRIX_STORE_ROWS   1
 
#define NL_MATRIX_STORE_COLUMNS   2
 
#define NL_MATRIX_STORE_SYMMETRIC   4
 
NLAPI NLMatrix NLAPIENTRY nlSparseMatrixNew (NLuint m, NLuint n, NLenum storage)
 Constructs a new NLSparseMatrix.
 
NLAPI void NLAPIENTRY nlSparseMatrixConstruct (NLSparseMatrix *M, NLuint m, NLuint n, NLenum storage)
 Constructs a new NLSparseMatrix.
 
NLAPI void NLAPIENTRY nlSparseMatrixDestroy (NLSparseMatrix *M)
 Destroys an NLSparseMatrix.
 
NLAPI void NLAPIENTRY nlSparseMatrixMult (NLSparseMatrix *A, const NLdouble *x, NLdouble *y)
 Computes a matrix-vector product.
 
NLAPI void NLAPIENTRY nlSparseMatrixAdd (NLSparseMatrix *M, NLuint i, NLuint j, NLdouble value)
 Adds a coefficient to an NLSparseMatrix.
 
NLAPI void NLAPIENTRY nlSparseMatrixZero (NLSparseMatrix *M)
 Zeroes an NLSparseMatrix.
 
NLAPI void NLAPIENTRY nlSparseMatrixClear (NLSparseMatrix *M)
 Clears an NLSparseMatrix.
 
NLAPI NLuint_big NLAPIENTRY nlSparseMatrixNNZ (NLSparseMatrix *M)
 Gets the number of non-zero coefficient in an NLSparseMatrix.
 
NLAPI void NLAPIENTRY nlSparseMatrixSort (NLSparseMatrix *M)
 Sorts the coefficients in an NLSParseMatrix.
 

Detailed Description

Definition at line 479 of file nl_matrix.h.

Friends And Related Symbol Documentation

◆ NL_MATRIX_STORE_COLUMNS

#define NL_MATRIX_STORE_COLUMNS   2
related

for NLSparseMatrix storage: indicates that columns are stored.

Definition at line 470 of file nl_matrix.h.

◆ NL_MATRIX_STORE_ROWS

#define NL_MATRIX_STORE_ROWS   1
related

for NLSparseMatrix storage: indicates that rows are stored.

Definition at line 464 of file nl_matrix.h.

◆ NL_MATRIX_STORE_SYMMETRIC

#define NL_MATRIX_STORE_SYMMETRIC   4
related

for NLSparseMatrix storage: indicates that symmetric storage is used (only the lower triangular part is stored).

Definition at line 477 of file nl_matrix.h.

◆ nlCRSMatrixAdd()

NLAPI void NLAPIENTRY nlCRSMatrixAdd ( NLCRSMatrix M,
NLuint  i,
NLuint  j,
NLdouble  value 
)
related

Adds a coefficient to an NLSparseMatrix.

Performs the following operation: $ a_{i,j} \leftarrow a_{i,j} + \mbox{value} $

Parameters
[in,out]Ma pointer to an NLSparseMatrix
[in]iindex of the row
[in]jindex of the column
[in]valuethe coefficient to be added

◆ nlSparseMatrixAdd()

NLAPI void NLAPIENTRY nlSparseMatrixAdd ( NLSparseMatrix M,
NLuint  i,
NLuint  j,
NLdouble  value 
)
related

Adds a coefficient to an NLSparseMatrix.

Performs the following operation: $ a_{i,j} \leftarrow a_{i,j} + \mbox{value} $

Parameters
[in,out]Ma pointer to an NLSparseMatrix
[in]iindex of the row
[in]jindex of the column
[in]valuethe coefficient to be added

◆ nlSparseMatrixClear()

NLAPI void NLAPIENTRY nlSparseMatrixClear ( NLSparseMatrix M)
related

Clears an NLSparseMatrix.

The memory is freed.

Parameters
[in,out]Ma pointer to the NLSparseMatrix to zero

◆ nlSparseMatrixConstruct()

NLAPI void NLAPIENTRY nlSparseMatrixConstruct ( NLSparseMatrix M,
NLuint  m,
NLuint  n,
NLenum  storage 
)
related

Constructs a new NLSparseMatrix.

Parameters
[in,out]Ma pointer to an uninitialized NLSparseMatrix
[in]mnumber of rows
[in]nnumber of columns
[in]storagea bitwise or combination of flags that indicate what needs to be stored in the matrix.

◆ nlSparseMatrixDestroy()

NLAPI void NLAPIENTRY nlSparseMatrixDestroy ( NLSparseMatrix M)
related

Destroys an NLSparseMatrix.

Only the memory allocated by the NLSparseMatrix is freed. The NLSparseMatrix structure is not freed.

Parameters
[in,out]Ma pointer to an NLSparseMatrix

◆ nlSparseMatrixMult()

NLAPI void NLAPIENTRY nlSparseMatrixMult ( NLSparseMatrix A,
const NLdouble x,
NLdouble y 
)
related

Computes a matrix-vector product.

Parameters
[in]Aa pointer to the matrix
[in]xthe vector to be multiplied, size = A->n
[in]ywhere to store the result, size = A->m

◆ nlSparseMatrixNew()

NLAPI NLMatrix NLAPIENTRY nlSparseMatrixNew ( NLuint  m,
NLuint  n,
NLenum  storage 
)
related

Constructs a new NLSparseMatrix.

Parameters
[in]mnumber of rows
[in]nnumber of columns
[in]storagea bitwise or combination of flags that indicate what needs to be stored in the matrix.
Returns
a pointer to a dynamically allocated NLSparseMatrix. It can be later deallocated by nlDeleteMatrix().

◆ nlSparseMatrixNNZ()

NLAPI NLuint_big NLAPIENTRY nlSparseMatrixNNZ ( NLSparseMatrix M)
related

Gets the number of non-zero coefficient in an NLSparseMatrix.

Parameters
[in]Ma pointer to the NLSparseMatrix
Returns
the number of non-zero coefficients in M

◆ nlSparseMatrixSort()

NLAPI void NLAPIENTRY nlSparseMatrixSort ( NLSparseMatrix M)
related

Sorts the coefficients in an NLSParseMatrix.

Parameters
[in,out]Ma pointer to the NLSparseMatrix

◆ nlSparseMatrixZero()

NLAPI void NLAPIENTRY nlSparseMatrixZero ( NLSparseMatrix M)
related

Zeroes an NLSparseMatrix.

The memory is not freed.

Parameters
[in,out]Ma pointer to the NLSparseMatrix to zero

Member Data Documentation

◆ column

NLRowColumn* NLSparseMatrix::column

the columns if (storage & NL_MATRIX_STORE_COLUMNS), size = n, NULL otherwise

Definition at line 533 of file nl_matrix.h.

◆ column_capacity

NLuint NLSparseMatrix::column_capacity

Number of column descriptors allocated in the column array.

Definition at line 550 of file nl_matrix.h.

◆ destroy_func

NLDestroyMatrixFunc NLSparseMatrix::destroy_func

destructor

Definition at line 500 of file nl_matrix.h.

◆ diag

NLdouble* NLSparseMatrix::diag

the diagonal elements, size = diag_size

Definition at line 538 of file nl_matrix.h.

◆ diag_capacity

NLuint NLSparseMatrix::diag_capacity

Number of elements allocated to store the diagonal.

Definition at line 516 of file nl_matrix.h.

◆ diag_size

NLuint NLSparseMatrix::diag_size

number of elements in the diagonal

Definition at line 511 of file nl_matrix.h.

◆ m

NLuint NLSparseMatrix::m

number of rows

Definition at line 483 of file nl_matrix.h.

◆ mult_func

NLMultMatrixVectorFunc NLSparseMatrix::mult_func

Matrix x vector product.

Definition at line 505 of file nl_matrix.h.

◆ n

NLuint NLSparseMatrix::n

number of columns

Definition at line 488 of file nl_matrix.h.

◆ row

NLRowColumn* NLSparseMatrix::row

the rows if (storage & NL_MATRIX_STORE_ROWS), size = m, NULL otherwise

Definition at line 527 of file nl_matrix.h.

◆ row_capacity

NLuint NLSparseMatrix::row_capacity

Number of row descriptors allocated in the row array.

Definition at line 544 of file nl_matrix.h.

◆ storage

NLenum NLSparseMatrix::storage

indicates what is stored in this matrix

Definition at line 521 of file nl_matrix.h.

◆ type

NLenum NLSparseMatrix::type

Matrix type.

One of NL_MATRIX_DYNAMIC, NL_MATRIX_CRS, NL_MATRIX_SUPERLU_EXT, NL_CHOLDMOD_MATRIX_EXT

Definition at line 495 of file nl_matrix.h.


The documentation for this struct was generated from the following file: