Trait Minor

Source
pub trait Minor: Matrix {
    type Index;
    type Output;

    // Required method
    fn minor(&self, index: Self::Index) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn minor(&self, index: Self::Index) -> Self::Output

Returns the determinant of 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 m = [
    [5.0, 6.0],
    [8.0, 9.0]
].det();
assert_eq!(a.minor((0, 0)), m);

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.

Implementations on Foreign Types§

Source§

impl<F, const N: usize> Minor for [[F; N]; N]
where Self: Submatrix<[[F; { _ }]; { _ }], Index = (usize, usize)>, [[F; { _ }]; { _ }]: Det,

Source§

type Index = <[[F; N]; N] as Submatrix<[[F; { _ }]; { _ }]>>::Index

Source§

type Output = <[[F; { _ }]; { _ }] as Det>::Output

Source§

fn minor(&self, index: Self::Index) -> Self::Output

Implementors§