vm_spmat struct
#include <vecmat.h>

Heap sparse matrix in compressed sparse row (CSR) form.

Square n × n. Row i owns col[k], val[k] for row_ptr[i] <= k < row_ptr[i + 1].

Public variables

int n
Matrix order (n × n).
int nnz
Number of stored non-zeros.
int* row_ptr
Row starts; length n + 1, row_ptr[n] == nnz.
int* col
Column indices; length nnz.
vm_float_t* val
Nonzero values; length nnz.