pub trait Submatrix<O>: Matrixwhere
    O: Matrix,
{ type Index; fn submatrix(&self, index: Self::Index) -> O; }

Required Associated Types§

Required Methods§

Returns the submatrix of a given cell

Mᵢⱼ

Arguments
  • index - Row and/or collumn to neglect
Examples
let a = [
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0]
];
let s = [
    [5.0, 6.0],
    [8.0, 9.0]
];
assert_eq!(a.submatrix((0, 0)), s);

Implementations on Foreign Types§

Implementors§