Skip to main content

Module mtx

Module mtx 

Source
Expand description

Matrix Market I/O.

sprs::io::write_matrix_market_sym writes the upper triangle, but the Matrix Market spec calls for the lower triangle (i ≥ j). To stay compatible with strict readers (e.g. fast_matrix_market), we hand roll the symmetric writer. We delegate to sprs for general (non symmetric) output and for reading.

Functions§

read_mtx
Read a Matrix Market file into a CSR matrix.
read_vector_mtx
Read a dense vector written by write_vector_mtx (array real general): %-comment lines, a <len> 1 dimensions line, then one value per line.
write_mtx
write_vector_mtx
Write a dense vector as Matrix Market array real general.