|
SpM Handbook 1.3.0
|
Subroutines to detect diagonal zeros. More...
Files | |
| file | s_spm_get_diagonal_zeros.c |
| file | d_spm_get_diagonal_zeros.c |
| file | c_spm_get_diagonal_zeros.c |
| file | z_spm_get_diagonal_zeros.c |
| int | z_spmGetDiagonalZeros (const spmatrix_t *spm, spm_int_t *zeros_n, spm_int_t **zeros_list) |
| Detect unknowns with a zero or missing diagonal entry. | |
| static int | z_spm_get_diagonal_zeros_csx (const spmatrix_t *spm, spm_int_t *zeros_n, spm_int_t **zeros_list) |
| Scan a CSC or CSR matrix for zero or missing diagonal entries. | |
| int | c_spmGetDiagonalZeros (const spmatrix_t *spm, spm_int_t *zeros_n, spm_int_t **zeros_list) |
| Detect unknowns with a zero or missing diagonal entry. | |
| static int | c_spm_get_diagonal_zeros_csx (const spmatrix_t *spm, spm_int_t *zeros_n, spm_int_t **zeros_list) |
| Scan a CSC or CSR matrix for zero or missing diagonal entries. | |
| int | d_spmGetDiagonalZeros (const spmatrix_t *spm, spm_int_t *zeros_n, spm_int_t **zeros_list) |
| Detect unknowns with a zero or missing diagonal entry. | |
| static int | d_spm_get_diagonal_zeros_csx (const spmatrix_t *spm, spm_int_t *zeros_n, spm_int_t **zeros_list) |
| Scan a CSC or CSR matrix for zero or missing diagonal entries. | |
| int | s_spmGetDiagonalZeros (const spmatrix_t *spm, spm_int_t *zeros_n, spm_int_t **zeros_list) |
| Detect unknowns with a zero or missing diagonal entry. | |
| static int | s_spm_get_diagonal_zeros_csx (const spmatrix_t *spm, spm_int_t *zeros_n, spm_int_t **zeros_list) |
| Scan a CSC or CSR matrix for zero or missing diagonal entries. | |
Subroutines to detect diagonal zeros.
| int z_spmGetDiagonalZeros | ( | const spmatrix_t * | spm, |
| spm_int_t * | zeros_n, | ||
| spm_int_t ** | zeros_list ) |
Detect unknowns with a zero or missing diagonal entry.
| [in] | spm | The sparse matrix, in SpmCSC or SpmCSR format. |
| [out] | zeros_n | On exit, the number of unknowns whose diagonal entry is zero or absent. |
| [out] | zeros_list | On exit, pointer to an array containing the baseval-indexed indices of the affected unknowns. Set to NULL when zeros_n is 0 or when the function fails. The caller is responsible for freeing this array. |
| SPM_SUCCESS | On success. |
| SPM_ERR_BADPARAMETER | If spm->fmttype is neither SpmCSC nor SpmCSR. |
| SPM_ERR_OUTOFMEMORY | If the allocation of zeros_list failed. |
Definition at line 151 of file z_spm_get_diagonal_zeros.c.
References spmatrix_s::fmttype, spmatrix_s::n, SPM_ERR_BADPARAMETER, SPM_ERR_NOTIMPLEMENTED, SPM_ERR_OUTOFMEMORY, spm_imax(), SPM_SUCCESS, SpmCSC, SpmCSR, SpmIJV, and z_spm_get_diagonal_zeros_csx().
Referenced by spmGetDiagonalZeros().
| int c_spmGetDiagonalZeros | ( | const spmatrix_t * | spm, |
| spm_int_t * | zeros_n, | ||
| spm_int_t ** | zeros_list ) |
Detect unknowns with a zero or missing diagonal entry.
| [in] | spm | The sparse matrix, in SpmCSC or SpmCSR format. |
| [out] | zeros_n | On exit, the number of unknowns whose diagonal entry is zero or absent. |
| [out] | zeros_list | On exit, pointer to an array containing the baseval-indexed indices of the affected unknowns. Set to NULL when zeros_n is 0 or when the function fails. The caller is responsible for freeing this array. |
| SPM_SUCCESS | On success. |
| SPM_ERR_BADPARAMETER | If spm->fmttype is neither SpmCSC nor SpmCSR. |
| SPM_ERR_OUTOFMEMORY | If the allocation of zeros_list failed. |
Definition at line 151 of file c_spm_get_diagonal_zeros.c.
References c_spm_get_diagonal_zeros_csx(), spmatrix_s::fmttype, spmatrix_s::n, SPM_ERR_BADPARAMETER, SPM_ERR_NOTIMPLEMENTED, SPM_ERR_OUTOFMEMORY, spm_imax(), SPM_SUCCESS, SpmCSC, SpmCSR, and SpmIJV.
Referenced by spmGetDiagonalZeros().
| int d_spmGetDiagonalZeros | ( | const spmatrix_t * | spm, |
| spm_int_t * | zeros_n, | ||
| spm_int_t ** | zeros_list ) |
Detect unknowns with a zero or missing diagonal entry.
| [in] | spm | The sparse matrix, in SpmCSC or SpmCSR format. |
| [out] | zeros_n | On exit, the number of unknowns whose diagonal entry is zero or absent. |
| [out] | zeros_list | On exit, pointer to an array containing the baseval-indexed indices of the affected unknowns. Set to NULL when zeros_n is 0 or when the function fails. The caller is responsible for freeing this array. |
| SPM_SUCCESS | On success. |
| SPM_ERR_BADPARAMETER | If spm->fmttype is neither SpmCSC nor SpmCSR. |
| SPM_ERR_OUTOFMEMORY | If the allocation of zeros_list failed. |
Definition at line 151 of file d_spm_get_diagonal_zeros.c.
References d_spm_get_diagonal_zeros_csx(), spmatrix_s::fmttype, spmatrix_s::n, SPM_ERR_BADPARAMETER, SPM_ERR_NOTIMPLEMENTED, SPM_ERR_OUTOFMEMORY, spm_imax(), SPM_SUCCESS, SpmCSC, SpmCSR, and SpmIJV.
Referenced by spmGetDiagonalZeros().
| int s_spmGetDiagonalZeros | ( | const spmatrix_t * | spm, |
| spm_int_t * | zeros_n, | ||
| spm_int_t ** | zeros_list ) |
Detect unknowns with a zero or missing diagonal entry.
| [in] | spm | The sparse matrix, in SpmCSC or SpmCSR format. |
| [out] | zeros_n | On exit, the number of unknowns whose diagonal entry is zero or absent. |
| [out] | zeros_list | On exit, pointer to an array containing the baseval-indexed indices of the affected unknowns. Set to NULL when zeros_n is 0 or when the function fails. The caller is responsible for freeing this array. |
| SPM_SUCCESS | On success. |
| SPM_ERR_BADPARAMETER | If spm->fmttype is neither SpmCSC nor SpmCSR. |
| SPM_ERR_OUTOFMEMORY | If the allocation of zeros_list failed. |
Definition at line 151 of file s_spm_get_diagonal_zeros.c.
References spmatrix_s::fmttype, spmatrix_s::n, s_spm_get_diagonal_zeros_csx(), SPM_ERR_BADPARAMETER, SPM_ERR_NOTIMPLEMENTED, SPM_ERR_OUTOFMEMORY, spm_imax(), SPM_SUCCESS, SpmCSC, SpmCSR, and SpmIJV.
Referenced by spmGetDiagonalZeros().
|
static |
Scan a CSC or CSR matrix for zero or missing diagonal entries.
| [in] | spm | The sparse matrix, in SpmCSC or SpmCSR format. |
| [in,out] | zeros_n | On entry, the capacity of zeros_list. On exit, the number of zero or missing diagonal entries. |
| [in,out] | zeros_list | On entry, a pre-allocated array of size *zeros_n. On exit, the first *zeros_n entries contain the indices of the zero or missing diagonal entries. The array may be reallocated. |
| SPM_SUCCESS | On success. |
| SPM_ERR_OUTOFMEMORY | If zeros_list could not be enlarged. |
Definition at line 55 of file s_spm_get_diagonal_zeros.c.
References spmatrix_s::colptr, spmatrix_s::fmttype, spmatrix_s::n, spmatrix_s::rowptr, SPM_ERR_OUTOFMEMORY, spm_imin(), SPM_SUCCESS, SpmCSC, SpmCSR, spmFindBase(), and spmatrix_s::values.
Referenced by s_spmGetDiagonalZeros().
|
static |
Scan a CSC or CSR matrix for zero or missing diagonal entries.
| [in] | spm | The sparse matrix, in SpmCSC or SpmCSR format. |
| [in,out] | zeros_n | On entry, the capacity of zeros_list. On exit, the number of zero or missing diagonal entries. |
| [in,out] | zeros_list | On entry, a pre-allocated array of size *zeros_n. On exit, the first *zeros_n entries contain the indices of the zero or missing diagonal entries. The array may be reallocated. |
| SPM_SUCCESS | On success. |
| SPM_ERR_OUTOFMEMORY | If zeros_list could not be enlarged. |
Definition at line 55 of file d_spm_get_diagonal_zeros.c.
References spmatrix_s::colptr, spmatrix_s::fmttype, spmatrix_s::n, spmatrix_s::rowptr, SPM_ERR_OUTOFMEMORY, spm_imin(), SPM_SUCCESS, SpmCSC, SpmCSR, spmFindBase(), and spmatrix_s::values.
Referenced by d_spmGetDiagonalZeros().
|
static |
Scan a CSC or CSR matrix for zero or missing diagonal entries.
| [in] | spm | The sparse matrix, in SpmCSC or SpmCSR format. |
| [in,out] | zeros_n | On entry, the capacity of zeros_list. On exit, the number of zero or missing diagonal entries. |
| [in,out] | zeros_list | On entry, a pre-allocated array of size *zeros_n. On exit, the first *zeros_n entries contain the indices of the zero or missing diagonal entries. The array may be reallocated. |
| SPM_SUCCESS | On success. |
| SPM_ERR_OUTOFMEMORY | If zeros_list could not be enlarged. |
Definition at line 55 of file c_spm_get_diagonal_zeros.c.
References spmatrix_s::colptr, spmatrix_s::fmttype, spmatrix_s::n, spmatrix_s::rowptr, SPM_ERR_OUTOFMEMORY, spm_imin(), SPM_SUCCESS, SpmCSC, SpmCSR, spmFindBase(), and spmatrix_s::values.
Referenced by c_spmGetDiagonalZeros().
|
static |
Scan a CSC or CSR matrix for zero or missing diagonal entries.
| [in] | spm | The sparse matrix, in SpmCSC or SpmCSR format. |
| [in,out] | zeros_n | On entry, the capacity of zeros_list. On exit, the number of zero or missing diagonal entries. |
| [in,out] | zeros_list | On entry, a pre-allocated array of size *zeros_n. On exit, the first *zeros_n entries contain the indices of the zero or missing diagonal entries. The array may be reallocated. |
| SPM_SUCCESS | On success. |
| SPM_ERR_OUTOFMEMORY | If zeros_list could not be enlarged. |
Definition at line 55 of file z_spm_get_diagonal_zeros.c.
References spmatrix_s::colptr, spmatrix_s::fmttype, spmatrix_s::n, spmatrix_s::rowptr, SPM_ERR_OUTOFMEMORY, spm_imin(), SPM_SUCCESS, SpmCSC, SpmCSR, spmFindBase(), and spmatrix_s::values.
Referenced by z_spmGetDiagonalZeros().