Skip to main content

Matrix

Trait Matrix 

Source
pub trait Matrix: VectorSpace {
    type Row: DualSpace + FiniteDimensional + VectorSpace<Scalar = Self::Scalar>;
    type Column: DualSpace + FiniteDimensional + VectorSpace<Scalar = Self::Scalar>;
    type Transpose: Matrix<Scalar = Self::Scalar, Row = <Self::Column as DualSpace>::Dual, Column = <Self::Row as DualSpace>::Dual>;

    // Required methods
    fn row_component(&self, index: usize) -> Option<Self::Row>;
    fn column_component(&self, index: usize) -> Option<Self::Column>;
    fn transpose(self) -> Self::Transpose;

    // Provided methods
    fn row_count() -> usize { ... }
    fn column_count() -> usize { ... }
    fn scalar_component(
        &self,
        row: usize,
        column: usize,
    ) -> Option<Self::Scalar> { ... }
}

Required Associated Types§

Source

type Row: DualSpace + FiniteDimensional + VectorSpace<Scalar = Self::Scalar>

Source

type Column: DualSpace + FiniteDimensional + VectorSpace<Scalar = Self::Scalar>

Source

type Transpose: Matrix<Scalar = Self::Scalar, Row = <Self::Column as DualSpace>::Dual, Column = <Self::Row as DualSpace>::Dual>

Required Methods§

Source

fn row_component(&self, index: usize) -> Option<Self::Row>

Source

fn column_component(&self, index: usize) -> Option<Self::Column>

Source

fn transpose(self) -> Self::Transpose

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> Matrix for Matrix2<T>

Source§

type Row = Matrix<T, Const<1>, Const<2>, ArrayStorage<T, 1, 2>>

Source§

type Column = Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

Source§

type Transpose = Matrix<T, Const<2>, Const<2>, ArrayStorage<T, 2, 2>>

Source§

fn row_component(&self, index: usize) -> Option<Self::Row>

Source§

fn column_component(&self, index: usize) -> Option<Self::Column>

Source§

fn transpose(self) -> Self::Transpose

Source§

impl<T> Matrix for Matrix3<T>

Source§

type Row = Matrix<T, Const<1>, Const<3>, ArrayStorage<T, 1, 3>>

Source§

type Column = Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

Source§

type Transpose = Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

Source§

fn row_component(&self, index: usize) -> Option<Self::Row>

Source§

fn column_component(&self, index: usize) -> Option<Self::Column>

Source§

fn transpose(self) -> Self::Transpose

Implementors§