pub fn csc_mulacc_dense_colmaj<'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");
    }

    let axis1 = Axis(1);
    for (mut ocol, rcol) in out.axis_iter_mut(axis1).zip(rhs.axis_iter(axis1)) {
        for (rrow, lcol) in lhs.outer_iterator().enumerate() {
            let rval = rcol[[rrow]];
            for (orow, &lval) in lcol.iter() {
                let prev = ocol[[orow]];
                ocol[[orow]] = prev + lval * rval;
            }
        }
    }
}
/// CSC-dense colmaj multiplication
///
/// Performs better if rhs has few columns.
CSC-dense colmaj multiplication
Performs better if rhs has few columns.
CSC - dense colmaj multiplication Performs better if rhs has few columns .
pub fn csc_mulacc_dense_colmaj<'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");
    }
    let axis1 = Axis(1);
    for (mut ocol, rcol) in out.axis_iter_mut(axis1).zip(rhs.axis_iter(axis1)) {
        for (rrow, lcol) in lhs.outer_iterator().enumerate() {
            let rval = rcol[[rrow]];
            for (orow, &lval) in lcol.iter() {
                let prev = ocol[[orow]];
                ocol[[orow]] = prev + lval * rval;
            }
        }
    }
}
pub fn csc_mulacc_dense_colmaj < ' 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 ! ( " " ) ; } let axis1 = Axis ( 1 ) ; for ( mut ocol , rcol ) in out . axis_iter_mut ( axis1 ) . zip ( rhs . axis_iter ( axis1 ) ) { for ( rrow , lcol ) in lhs . outer_iterator ( ) . enumerate ( ) { let rval = rcol [ [ rrow ] ] ; for ( orow , & lval ) in lcol . iter ( ) { let prev = ocol [ [ orow ] ] ; ocol [ [ orow ] ] = prev + lval * rval ; } } } }
CSC-dense colmaj multiplication
Performs better if rhs has few columns.
CSC - dense colmaj multiplication Performs better if rhs has few columns .
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>