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", so this trait is not object safe.