Trait MatVec

Source
pub trait MatVec {
    type A: Scalar;

    // Required methods
    fn nrows(&self) -> usize;
    fn ncols(&self) -> usize;
    fn matvec(&self, mat: ArrayView1<'_, Self::A>) -> Array1<Self::A>;
}
Expand description

Matrix-Vector Product Trait

This trait defines an interface for operators that provide matrix-vector products.

Required Associated Types§

Required Methods§

Source

fn nrows(&self) -> usize

Source

fn ncols(&self) -> usize

Source

fn matvec(&self, mat: ArrayView1<'_, Self::A>) -> Array1<Self::A>

Implementations on Foreign Types§

Source§

impl<A, S> MatVec for ArrayBase<S, Ix2>
where A: Scalar, S: Data<Elem = A>,

Source§

type A = A

Source§

fn nrows(&self) -> usize

Source§

fn ncols(&self) -> usize

Source§

fn matvec(&self, vec: ArrayView1<'_, Self::A>) -> Array1<Self::A>

Implementors§