MatrixView

Trait MatrixView 

Source
pub trait MatrixView<'a>: for<'b> MatrixOpsByValue<&'b Self::Owned, Self::Owned> + Mul<Scale<Self::T>, Output = Self::Owned> {
    type Owned;

    // Required methods
    fn into_owned(self) -> Self::Owned;
    fn gemv_v(
        &self,
        alpha: Self::T,
        x: &<Self::V as Vector>::View<'_>,
        beta: Self::T,
        y: &mut Self::V,
    );
    fn gemv_o(
        &self,
        alpha: Self::T,
        x: &Self::V,
        beta: Self::T,
        y: &mut Self::V,
    );
}
Expand description

A borrowed immutable view of a dense matrix, supporting read-only arithmetic operations.

This trait represents a temporary immutable reference to a matrix’s data, allowing read-only operations like addition, subtraction, scalar multiplication, and matrix-vector multiplication. Matrix views can be created via the columns() methods on a DenseMatrix.

Required Associated Types§

Required Methods§

Source

fn into_owned(self) -> Self::Owned

Convert this view into an owned matrix, cloning the data if necessary.

Source

fn gemv_v( &self, alpha: Self::T, x: &<Self::V as Vector>::View<'_>, beta: Self::T, y: &mut Self::V, )

Perform a matrix-vector multiplication with a vector view: y = alpha * self * x + beta * y

Source

fn gemv_o(&self, alpha: Self::T, x: &Self::V, beta: Self::T, y: &mut Self::V)

Perform a matrix-vector multiplication with an owned vector: y = alpha * self * x + beta * y

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, T: Scalar> MatrixView<'a> for FaerMatRef<'a, T>

Source§

impl<'a, T: Scalar> MatrixView<'a> for NalgebraMatRef<'a, T>