Trait rustml::ops::MatrixVectorOps [] [src]

pub trait MatrixVectorOps<T> {
    fn add_row(&self, rhs: &[T]) -> Matrix<T>;
    fn sub_row(&self, rhs: &[T]) -> Matrix<T>;
    fn mul_vec(&self, v: &[T]) -> Vec<T>;
    fn transp_mul_vec(&self, v: &[T]) -> Vec<T>;
}

Trait for matrix vector operations.

Required Methods

fn add_row(&self, rhs: &[T]) -> Matrix<T>

Adds the given vector to each row of the matrix.

fn sub_row(&self, rhs: &[T]) -> Matrix<T>

Subtracts the given vector from each row of the matrix.

fn mul_vec(&self, v: &[T]) -> Vec<T>

Multiplies the matrix with a vector (i.e. X*v) and returns the result.

Implementation details

This operation is done via the underlying BLAS implementation.

fn transp_mul_vec(&self, v: &[T]) -> Vec<T>

Multiplies the transpose of the matrix with a vector (i.e. XT * v) and returns the result.

Implementation details

This operation is done via the underlying BLAS implementation.

Implementors