Trait SquareMatExt

Source
pub trait SquareMatExt {
    type Vector;

    // Required methods
    fn from_outer_product(a: Self::Vector, b: Self::Vector) -> Self;
    fn diagonal(&self) -> Self::Vector;
    fn inverse_or_zero(&self) -> Self;
    fn is_symmetric(&self) -> bool;
}
Expand description

An extension trait for matrices.

Required Associated Types§

Source

type Vector

The vector type associated with the matrix.

Required Methods§

Source

fn from_outer_product(a: Self::Vector, b: Self::Vector) -> Self

Creates a new matrix from the outer product a * b^T.

Source

fn diagonal(&self) -> Self::Vector

Returns the diagonal of the matrix.

Source

fn inverse_or_zero(&self) -> Self

Returns the inverse of self, or a zero matrix if the matrix is not invertible.

Source

fn is_symmetric(&self) -> bool

Returns true if the matrix is symmetric.

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.

Implementations on Foreign Types§

Source§

impl SquareMatExt for Mat3

Source§

impl SquareMatExt for Mat2

Source§

impl SquareMatExt for Mat3A

Source§

impl SquareMatExt for Mat4

Source§

impl SquareMatExt for DMat2

Source§

impl SquareMatExt for DMat3

Source§

impl SquareMatExt for DMat4

Implementors§