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§
Required Methods§
Sourcefn from_outer_product(a: Self::Vector, b: Self::Vector) -> Self
fn from_outer_product(a: Self::Vector, b: Self::Vector) -> Self
Creates a new matrix from the outer product a * b^T.
Sourcefn inverse_or_zero(&self) -> Self
fn inverse_or_zero(&self) -> Self
Returns the inverse of self, or a zero matrix if the matrix is not invertible.
Sourcefn is_symmetric(&self) -> bool
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".
Implementations on Foreign Types§
Source§impl SquareMatExt for DMat2
Available on crate feature f64 only.
impl SquareMatExt for DMat2
Available on crate feature
f64 only.Source§impl SquareMatExt for DMat3
Available on crate feature f64 only.
impl SquareMatExt for DMat3
Available on crate feature
f64 only.Source§impl SquareMatExt for DMat4
Available on crate feature f64 only.
impl SquareMatExt for DMat4
Available on crate feature
f64 only.