[−][src]Struct math_concept::lalg::Matrix
Methods
impl<T> Matrix<T> where
T: Copy + Add<Output = T> + Div<Output = T>,
[src]
T: Copy + Add<Output = T> + Div<Output = T>,
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]
U: Copy + Add<Output = U> + Div<Output = U>,
F: Fn(&T) -> U,
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]
T: Copy + Add<Output = T> + Div<Output = T>,
type Output = Matrix<T>
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self::Output
[src]
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]
T: Copy + Add<Output = T> + AddAssign<T> + Mul<Output = T> + Div<Output = T> + Default,
Auto Trait Implementations
impl<T> Send for Matrix<T> where
T: Send,
T: Send,
impl<T> Unpin for Matrix<T> where
T: Unpin,
T: Unpin,
impl<T> Sync for Matrix<T> where
T: Sync,
T: Sync,
impl<T> UnwindSafe for Matrix<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for Matrix<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,