[][src]Function sprs::bmat

pub fn bmat<'a, N, I, OuterArray, InnerArray>(mats: &OuterArray) -> CsMatI<N, I> where
    N: 'a + Clone + Default,
    I: 'a + SpIndex,
    OuterArray: 'a + AsRef<[InnerArray]>,
    InnerArray: 'a + AsRef<[Option<CsMatViewI<'a, N, I>>]>, 

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);