pub trait Diag {
    type Output;

    fn diag(&self) -> Self::Output;
}

Required Associated Types§

Required Methods§

Returns the diagonal of the given matrix

{aᵢᵢ}

Examples
let a = [
    [1.0, 2.0],
    [3.0, 4.0]
];
assert_eq!(a.diag(), [1.0, 4.0]);

Implementations on Foreign Types§

Implementors§