pub fn csc_mulacc_dense_rowmaj<'a, N, I>(lhs: CsMatViewI<N, I>,
                                         rhs: ArrayView<N, Ix2>,
                                         mut out: ArrayViewMut<'a, N, Ix2>
                                        )
where N: 'a + Num + Copy,
      I: 'a + SpIndex,
{
    if lhs.cols() != rhs.shape()[0] {
        panic!("Dimension mismatch");
    }
    if lhs.rows() != out.shape()[0] {
        panic!("Dimension mismatch");
    }
    if rhs.shape()[1] != out.shape()[1] {
        panic!("Dimension mismatch");
    }
    if !lhs.is_csc() {
        panic!("Storage mismatch");
    }

    for (lcol, rline) in lhs.outer_iterator().zip(rhs.outer_iter()) {
        for (orow, &lval) in lcol.iter() {
            let mut oline = out.row_mut(orow);
            for (oval, &rval) in oline.iter_mut().zip(rline.iter()) {
                let prev = *oval;
                *oval = prev + lval * rval;
            }
        }
    }
}
/// CSC-dense rowmaj multiplication
///
/// Performs better if rhs has a decent number of colums.
CSC-dense rowmaj multiplication
Performs better if rhs has a decent number of colums.
CSC - dense rowmaj multiplication Performs better if rhs has a decent number of colums .
pub fn csc_mulacc_dense_rowmaj<'a, N, I>(lhs: CsMatViewI<N, I>,
                                         rhs: ArrayView<N, Ix2>,
                                         mut out: ArrayViewMut<'a, N, Ix2>
                                        )
where N: 'a + Num + Copy,
      I: 'a + SpIndex,
{
    if lhs.cols() != rhs.shape()[0] {
        panic!("Dimension mismatch");
    }
    if lhs.rows() != out.shape()[0] {
        panic!("Dimension mismatch");
    }
    if rhs.shape()[1] != out.shape()[1] {
        panic!("Dimension mismatch");
    }
    if !lhs.is_csc() {
        panic!("Storage mismatch");
    }
    for (lcol, rline) in lhs.outer_iterator().zip(rhs.outer_iter()) {
        for (orow, &lval) in lcol.iter() {
            let mut oline = out.row_mut(orow);
            for (oval, &rval) in oline.iter_mut().zip(rline.iter()) {
                let prev = *oval;
                *oval = prev + lval * rval;
            }
        }
    }
}
pub fn csc_mulacc_dense_rowmaj < ' a , N , I > ( lhs : CsMatViewI < N , I > , rhs : ArrayView < N , Ix2 > , mut out : ArrayViewMut < ' a , N , Ix2 > ) where N : ' a + Num + Copy , I : ' a + SpIndex , { if lhs . cols ( ) != rhs . shape ( ) [ 0 ] { panic ! ( " " ) ; } if lhs . rows ( ) != out . shape ( ) [ 0 ] { panic ! ( " " ) ; } if rhs . shape ( ) [ 1 ] != out . shape ( ) [ 1 ] { panic ! ( " " ) ; } if ! lhs . is_csc ( ) { panic ! ( " " ) ; } for ( lcol , rline ) in lhs . outer_iterator ( ) . zip ( rhs . outer_iter ( ) ) { for ( orow , & lval ) in lcol . iter ( ) { let mut oline = out . row_mut ( orow ) ; for ( oval , & rval ) in oline . iter_mut ( ) . zip ( rline . iter ( ) ) { let prev = * oval ; * oval = prev + lval * rval ; } } } }
CSC-dense rowmaj multiplication
Performs better if rhs has a decent number of colums.
CSC - dense rowmaj multiplication Performs better if rhs has a decent number of colums .
lhs
CsMatViewI<N, I>
rhs
ArrayView<N, Ix2>
out
ArrayViewMut<'a, N, Ix2>
lhs
CsMatViewI<N, I>
rhs
ArrayView<N, Ix2>
out
ArrayViewMut<'a, N, Ix2>