Trait rust_blas::matrix::Matrix

source ·
pub trait Matrix<T> {
    // Required methods
    fn rows(&self) -> u32;
    fn cols(&self) -> u32;
    fn as_ptr(&self) -> *const T;
    fn as_mut_ptr(&mut self) -> *mut T;

    // Provided methods
    fn lead_dim(&self) -> u32 { ... }
    fn order(&self) -> Order { ... }
}
Expand description

Methods that allow a type to be used in BLAS functions as a matrix.

Required Methods§

source

fn rows(&self) -> u32

Returns the number of rows.

source

fn cols(&self) -> u32

Returns the number of columns.

source

fn as_ptr(&self) -> *const T

An unsafe pointer to a contiguous block of memory.

source

fn as_mut_ptr(&mut self) -> *mut T

An unsafe pointer to a contiguous block of memory.

Provided Methods§

source

fn lead_dim(&self) -> u32

The leading dimension of the matrix. Defaults to cols for RowMajor order and ‘rows’ for ColMajor order.

source

fn order(&self) -> Order

The order of the matrix. Defaults to RowMajor.

Trait Implementations§

source§

impl<'a, T> Add for &'a dyn Matrix<T>
where T: Axpy + Copy + Default,

§

type Output = Mat<T>

The resulting type after applying the + operator.
source§

fn add(self, b: &dyn Matrix<T>) -> Mat<T>

Performs the + operation. Read more
source§

impl<'a, T> BitXor<Marker> for &'a dyn Matrix<T>

§

type Output = Trans<&'a dyn Matrix<T>>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, m: Marker) -> Trans<&'a dyn Matrix<T>>

Performs the ^ operation. Read more
source§

impl<'a, T> From<&'a dyn Matrix<T>> for Mat<T>
where T: Copy,

source§

fn from(a: &dyn Matrix<T>) -> Mat<T>

Converts to this type from the input type.
source§

impl<'a> Mul<&'a dyn Matrix<Complex<f32>>> for Complex32

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

fn mul(self, x: &dyn Matrix<Complex32>) -> Mat<Complex32>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a dyn Matrix<Complex<f64>>> for Complex64

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, x: &dyn Matrix<Complex64>) -> Mat<Complex64>

Performs the * operation. Read more
source§

impl<'a, T> Mul<&'a dyn Matrix<T>> for Trans<&'a dyn Matrix<T>>
where T: Default + Gemm,

§

type Output = Mat<T>

The resulting type after applying the * operator.
source§

fn mul(self, b: &dyn Matrix<T>) -> Mat<T>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a dyn Matrix<f32>> for f32

§

type Output = Mat<f32>

The resulting type after applying the * operator.
source§

fn mul(self, x: &dyn Matrix<f32>) -> Mat<f32>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a dyn Matrix<f64>> for f64

§

type Output = Mat<f64>

The resulting type after applying the * operator.
source§

fn mul(self, x: &dyn Matrix<f64>) -> Mat<f64>

Performs the * operation. Read more
source§

impl<'a, T> Mul<&'a dyn Vector<T>> for &'a dyn Matrix<T>
where T: Default + Copy + Gemv,

§

type Output = Vec<T>

The resulting type after applying the * operator.
source§

fn mul(self, x: &dyn Vector<T>) -> Vec<T>

Performs the * operation. Read more
source§

impl<'a, T> Mul<T> for &'a dyn Matrix<T>
where T: Sized + Copy + Scal,

§

type Output = Mat<T>

The resulting type after applying the * operator.
source§

fn mul(self, alpha: T) -> Mat<T>

Performs the * operation. Read more
source§

impl<'a, T> Mul<Trans<&'a dyn Matrix<T>>> for &'a dyn Matrix<T>
where T: Default + Gemm,

§

type Output = Mat<T>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Trans<&dyn Matrix<T>>) -> Mat<T>

Performs the * operation. Read more
source§

impl<'a, T> Mul for &'a dyn Matrix<T>
where T: Default + Gemm,

§

type Output = Mat<T>

The resulting type after applying the * operator.
source§

fn mul(self, b: &dyn Matrix<T>) -> Mat<T>

Performs the * operation. Read more

Implementors§

source§

impl<T> Matrix<T> for BandMat<T>

source§

impl<T> Matrix<T> for Mat<T>