[−][src]Function sprs::io::write_matrix_market
pub fn write_matrix_market<'a, N, I, M, P>(path: P, mat: M) -> Result<(), Error> where
I: 'a + SpIndex + Display,
N: 'a + PrimitiveKind + Copy + Display,
M: IntoIterator<Item = (&'a N, (I, I))> + SparseMat,
P: AsRef<Path>,
Write a sparse matrix into the matrix market format.
Example
use sprs::{CsMat}; let save_path = "/tmp/identity5.mm"; let eye : CsMat<f64> = CsMat::eye(5); sprs::io::write_matrix_market(&save_path, &eye)?;