Trait rustml::ops::MatrixMatrixOps [] [src]

pub trait MatrixMatrixOps<T> {
    fn add(&self, rhs: &Matrix<T>) -> Matrix<T>;
    fn sub(&self, rhs: &Matrix<T>) -> Matrix<T>;
    fn mul(&self, rhs: &Matrix<T>, lhs_t: bool, rhs_t: bool) -> Matrix<T>;
}

Trait for matrix-matrix operations.

Required Methods

fn add(&self, rhs: &Matrix<T>) -> Matrix<T>

Add the matrix rhs to this matrix.

Implementation details: internally uses the in-place iadd.

fn sub(&self, rhs: &Matrix<T>) -> Matrix<T>

Subtracts the matrix rhs from this matrix.

Implementation details: internally uses the in-place isub.

fn mul(&self, rhs: &Matrix<T>, lhs_t: bool, rhs_t: bool) -> Matrix<T>

Multiplies this matrix with rhs using BLAS.

If lhs_t is true the transpose of the first matrix is used. If lhs_r is true the transpose of the second matrix is used.

Implementors