pub trait Matrix: Sized {
    fn height(&self) -> usize;
    fn length(&self) -> usize;
    fn empty() -> Self;
}

Required Methods§

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);

Returns the length of the given matrix

Examples
let a = [
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0]
];
assert_eq!(a.length(), 3);

Returns an empty matrix with the given dimensions

Examples
let a = [
    [0.0, 0.0],
    [0.0, 0.0]
]
assert_eq!(a, Matrix::empty())

Implementations on Foreign Types§

Implementors§