Function sprs::bmat[][src]

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

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