[][src]Struct math_concept::lalg::Matrix

pub struct Matrix<T> { /* fields omitted */ }

Methods

impl<T> Matrix<T> where
    T: Copy + Add<Output = T> + Div<Output = T>, 
[src]

pub fn new(r: usize, c: usize, v: Vec<T>) -> Matrix<T>[src]

pub fn from_vec(r: usize, c: usize, v: &Vec<T>) -> Matrix<T>[src]

pub fn rows(&self) -> usize[src]

pub fn cols(&self) -> usize[src]

pub fn at(&self, r: usize, c: usize) -> &T[src]

pub fn at_mut(&mut self, r: usize, c: usize) -> &mut T[src]

pub fn data(&self) -> &Vec<T>[src]

pub fn map<U, F>(&self, f: F) -> Matrix<U> where
    U: Copy + Add<Output = U> + Div<Output = U>,
    F: Fn(&T) -> U, 
[src]

pub fn diagonal(&self) -> Vec<T>[src]

Trait Implementations

impl<'a, T> Add<&'a Matrix<T>> for &'a Matrix<T> where
    T: Copy + Add<Output = T> + Div<Output = T>, 
[src]

type Output = Matrix<T>

The resulting type after applying the + operator.

impl<'a, T> Mul<&'a Matrix<T>> for &'a Matrix<T> where
    T: Copy + Add<Output = T> + AddAssign<T> + Mul<Output = T> + Div<Output = T> + Default
[src]

type Output = Matrix<T>

The resulting type after applying the * operator.

Auto Trait Implementations

impl<T> Send for Matrix<T> where
    T: Send

impl<T> Unpin for Matrix<T> where
    T: Unpin

impl<T> Sync for Matrix<T> where
    T: Sync

impl<T> UnwindSafe for Matrix<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Matrix<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]