Trait nalgebra::Diag [] [src]

pub trait Diag<V> {
    fn from_diag(diag: &V) -> Self;
    fn diag(&self) -> V;
}

Trait to get the diagonal of square matrices.

Required Methods

fn from_diag(diag: &V) -> Self

Creates a new matrix with the given diagonal.

fn diag(&self) -> V

The diagonal of this matrix.

Implementors