[][src]Trait static_math::traits::LinearAlgebra

pub trait LinearAlgebra<T> {
    fn rows(&self) -> usize;
fn cols(&self) -> usize;
fn transpose(&self) -> Self
    where
        Self: Sized
;
fn trace(&self) -> T;
fn norm2(&self) -> T;
fn det(&self) -> T;
fn inverse(&self) -> Option<Self>
    where
        Self: Sized
;
fn qr(&self) -> Option<(Self, Self)>
    where
        Self: Sized
; fn shape(&self) -> (usize, usize) { ... } }

Generic Trait for Matrix operations and Linear Algebra methods

Required methods

fn rows(&self) -> usize

get the rows of the matrix

fn cols(&self) -> usize

get the columns of the matrix

fn transpose(&self) -> Self where
    Self: Sized

transpose dimentions of the matrix

fn trace(&self) -> T

get the trace of the matrix

fn norm2(&self) -> T

compute the euclidean norm of the matrix

fn det(&self) -> T

compute the determinant of the matrix

fn inverse(&self) -> Option<Self> where
    Self: Sized

compute the inverse of the matrix

fn qr(&self) -> Option<(Self, Self)> where
    Self: Sized

compute the QR factorization of the matrix(if has inverse)

Loading content...

Provided methods

fn shape(&self) -> (usize, usize)

get the overal shape of the matrix

Loading content...

Implementors

impl<T: Float + Sum> LinearAlgebra<T> for M22<T>[src]

fn qr(&self) -> Option<(Self, Self)>[src]

Calculate de QR factorization of the M22 via gram-schmidt orthogonalization process

impl<T: Float + Sum> LinearAlgebra<T> for M33<T>[src]

fn qr(&self) -> Option<(Self, Self)>[src]

Calculate de QR factorization of the M33 via gram-schmidt orthogonalization process

impl<T: Float + Sum> LinearAlgebra<T> for M44<T>[src]

fn qr(&self) -> Option<(Self, Self)>[src]

Calculate de QR factorization of the M44 via gram-schmidt orthogonalization process

impl<T: Float + Sum> LinearAlgebra<T> for M55<T>[src]

fn inverse(&self) -> Option<Self>[src]

Calculate the inverse of the Matrix6x6 via tha Adjoint Matrix: A^(-1) = 1/det Adj where Adj = Cofactor.Transpose() Cofactor = (-1)^(i+j) M(i, j).det()

fn qr(&self) -> Option<(Self, Self)>[src]

Calculate de QR factorization of the M55 via gram-schmidt orthogonalization process

impl<T: Float + Sum> LinearAlgebra<T> for M66<T>[src]

fn inverse(&self) -> Option<Self>[src]

Calculate the inverse of the M66 via tha Adjoint Matrix:

A^(-1) = (1/det) * Adj

where: Adj = Cofactor.Transpose()

Cofactor = (-1)^(i+j) * M(i, j).det()

fn qr(&self) -> Option<(Self, Self)>[src]

Calculate de QR factorization of the M66 via gram-schmidt orthogonalization process

Loading content...