Struct generic_matrix::Matrix
source · [−]pub struct Matrix<T> { /* private fields */ }
Expand description
2D matrix.
Implementations
sourceimpl<T> Matrix<T>
impl<T> Matrix<T>
sourcepub fn from_fn<F>(row: usize, column: usize, f: F) -> Matrix<T> where
F: Fn(usize, usize) -> T,
pub fn from_fn<F>(row: usize, column: usize, f: F) -> Matrix<T> where
F: Fn(usize, usize) -> T,
Creates a new Matrix
.
sourcepub fn from_vec(row: usize, column: usize, data: Vec<T>) -> Matrix<T>
pub fn from_vec(row: usize, column: usize, data: Vec<T>) -> Matrix<T>
Creates a new Matrix
from vector.
sourcepub fn trans_in_place(&mut self)
pub fn trans_in_place(&mut self)
Transposes the matrix in-place.
Trait Implementations
sourceimpl<'a, Lhs, Rhs> Add<&'a Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
impl<'a, Lhs, Rhs> Add<&'a Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
sourceimpl<'a, 'b, Lhs, Rhs> Add<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
impl<'a, 'b, Lhs, Rhs> Add<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
sourceimpl<'a, Lhs, Rhs> Add<Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
impl<'a, Lhs, Rhs> Add<Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
sourceimpl<'a, Lhs, Rhs> Mul<&'a Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
impl<'a, Lhs, Rhs> Mul<&'a Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
sourceimpl<'a, 'b, Lhs, Rhs> Mul<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
impl<'a, 'b, Lhs, Rhs> Mul<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
sourceimpl<'a, Lhs, Rhs> Mul<Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
impl<'a, Lhs, Rhs> Mul<Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
sourceimpl<Lhs, Rhs> Mul<Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
impl<Lhs, Rhs> Mul<Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
sourceimpl<'a, Lhs, Rhs> Sub<&'a Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
impl<'a, Lhs, Rhs> Sub<&'a Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
sourceimpl<'a, 'b, Lhs, Rhs> Sub<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
impl<'a, 'b, Lhs, Rhs> Sub<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
sourceimpl<'a, Lhs, Rhs> Sub<Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
impl<'a, Lhs, Rhs> Sub<Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
impl<T: Eq> Eq for Matrix<T>
impl<T> StructuralEq for Matrix<T>
impl<T> StructuralPartialEq for Matrix<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Matrix<T> where
T: RefUnwindSafe,
impl<T> Send for Matrix<T> where
T: Send,
impl<T> Sync for Matrix<T> where
T: Sync,
impl<T> Unpin for Matrix<T> where
T: Unpin,
impl<T> UnwindSafe for Matrix<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more