pub trait Matrix: Sized {
// Required methods
fn height(&self) -> usize;
fn length(&self) -> usize;
fn empty() -> Self;
}
Required Methods§
Sourcefn height(&self) -> usize
fn height(&self) -> usize
Returns the height of the given matrix
§Examples
let a = [
[1.0, 2.0, 3.0],
[4.0, 5.0, 6.0]
];
assert_eq!(a.height(), 2);
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.