pub fn bmat<'a, N, I, Iptr, OuterArray, InnerArray>(
mats: &OuterArray
) -> CsMatI<N, I, Iptr>where
N: 'a + Clone + Default,
I: 'a + SpIndex,
Iptr: 'a + SpIndex,
OuterArray: 'a + AsRef<[InnerArray]>,
InnerArray: 'a + AsRef<[Option<CsMatViewI<'a, N, I, Iptr>>]>,
Expand description
Specify a sparse matrix by constructing it from blocks of other matrices
Examples
use sprs::CsMat;
let a = CsMat::<f64>::eye(3);
let b = CsMat::<f64>::eye(4);
let c = sprs::bmat(&[[Some(a.view()), None],
[None, Some(b.view())]]);
assert_eq!(c.rows(), 7);