pub trait LinearAlgebra<T> {
// Required methods
fn rows(&self) -> usize;
fn cols(&self) -> usize;
fn transpose(&self) -> Self
where Self: Sized;
fn trace(&self) -> T;
fn norm2(&self) -> T;
fn det(&self) -> T;
fn inverse(&self) -> Option<Self>
where Self: Sized;
fn qr(&self) -> Option<(Self, Self)>
where Self: Sized;
// Provided method
fn shape(&self) -> (usize, usize) { ... }
}Expand description
Generic Trait for Matrix operations and Linear Algebra methods
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".