Reader and writer for the Harwell-Boeing sparse matrix format, specifically the RUA (Real, Unsymmetric, Assembled) variant.
The file is text based and uses a fixed column width layout:
- Line 1 : 72 chars title + 8 chars identifier
- Line 2 : totcrd ptrcrd indcrd valcrd rhscrd (5 integers)
- Line 3 : mxtype(14) N M nz nrhs
- Line 4 : (ptrfmt) (indfmt) (valfmt)
- ptrcrd lines : column pointers (N + 1 integers, N = #columns)
- indcrd lines : row indices (nz integers)
- valcrd lines : numerical values (nz reals)
The stored matrix is column oriented (CSC). The internal SparseMatrix representation is row oriented (CSR), so a transposed index mapping is applied on both read and write.