rrSparse

struct csr_matrix_t

Public Members

unsigned m

number of rows

unsigned n

number of columns

unsigned nnz

number of stored (nonzero) entries.

double *values

array of stored (nonzero) entries of the matrix length: nnz

unsigned *colidx

array of column indices of the stored (nonzero) entries of the matrix, length: nnz

unsigned *rowptr

array of indices into the colidx and values arrays, for each column, length: m + 1

This CSR matrix has the property that even rows with zero non-zero values have an entry in this array, if the i’th row has zero no values, then rowptr[j] == rowptr[j+1]. This property makes it easy to set values.