Expand description
Represents a matrix with constant M
rows and constant N
columns.
The underlying data is represented as an array and is always stored in column-major order.
See the crate root for usage examples.
Implementations
sourceimpl<T, const M: usize, const N: usize> Matrix<T, M, N>
impl<T, const M: usize, const N: usize> Matrix<T, M, N>
sourcepub fn repeat(element: T) -> Selfwhere
T: Copy,
pub fn repeat(element: T) -> Selfwhere
T: Copy,
Create a new matrix filled with the given element.
sourcepub fn repeat_with<F>(f: F) -> Selfwhere
F: FnMut() -> T,
pub fn repeat_with<F>(f: F) -> Selfwhere
F: FnMut() -> T,
Create a new matrix filled with computed elements.
Elements will be filled in column-major order.
sourcepub fn as_mut_slice(&mut self) -> &mut [T]ⓘ
pub fn as_mut_slice(&mut self) -> &mut [T]ⓘ
Views the underlying data as a contiguous mutable slice.
sourcepub fn get<I>(&self, i: I) -> Option<&I::Output>where
I: MatrixIndex<Self>,
pub fn get<I>(&self, i: I) -> Option<&I::Output>where
I: MatrixIndex<Self>,
Returns a reference to an element in the matrix or None
if out of
bounds.
sourcepub fn get_mut<I>(&mut self, i: I) -> Option<&mut I::Output>where
I: MatrixIndex<Self>,
pub fn get_mut<I>(&mut self, i: I) -> Option<&mut I::Output>where
I: MatrixIndex<Self>,
Returns a mutable reference to an element in the matrix or None
if out
of bounds.
sourcepub unsafe fn get_unchecked<I>(&self, i: I) -> &I::Outputwhere
I: MatrixIndex<Self>,
pub unsafe fn get_unchecked<I>(&self, i: I) -> &I::Outputwhere
I: MatrixIndex<Self>,
Returns a reference to an element in the matrix without doing any bounds checking.
Safety
Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used.
sourcepub unsafe fn get_unchecked_mut<I>(&mut self, i: I) -> &mut I::Outputwhere
I: MatrixIndex<Self>,
pub unsafe fn get_unchecked_mut<I>(&mut self, i: I) -> &mut I::Outputwhere
I: MatrixIndex<Self>,
Returns a mutable reference to an element in the matrix without doing any bounds checking.
Safety
Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used.
sourcepub fn row(&self, i: usize) -> &Row<T, M, N>
pub fn row(&self, i: usize) -> &Row<T, M, N>
Returns a reference to the i
-th row of this matrix.
sourcepub fn row_mut(&mut self, i: usize) -> &mut Row<T, M, N>
pub fn row_mut(&mut self, i: usize) -> &mut Row<T, M, N>
Returns a mutable reference to the i
-th row of this matrix.
sourcepub fn column(&self, i: usize) -> &Column<T, M, N>
pub fn column(&self, i: usize) -> &Column<T, M, N>
Returns a reference to the i
-th column of this matrix.
sourcepub fn column_mut(&mut self, i: usize) -> &mut Column<T, M, N>
pub fn column_mut(&mut self, i: usize) -> &mut Column<T, M, N>
Returns a mutable reference to the i
-th column of this matrix.
sourcepub fn iter_mut(&mut self) -> IterMut<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
Returns a mutable iterator over the underlying data.
sourcepub fn iter_rows(&self) -> IterRows<'_, T, M, N>ⓘ
pub fn iter_rows(&self) -> IterRows<'_, T, M, N>ⓘ
Returns an iterator over the rows in this matrix.
sourcepub fn iter_rows_mut(&mut self) -> IterRowsMut<'_, T, M, N>ⓘ
pub fn iter_rows_mut(&mut self) -> IterRowsMut<'_, T, M, N>ⓘ
Returns a mutable iterator over the rows in this matrix.
sourcepub fn iter_columns(&self) -> IterColumns<'_, T, M, N>ⓘ
pub fn iter_columns(&self) -> IterColumns<'_, T, M, N>ⓘ
Returns an iterator over the columns in this matrix.
sourcepub fn iter_columns_mut(&mut self) -> IterColumnsMut<'_, T, M, N>ⓘ
pub fn iter_columns_mut(&mut self) -> IterColumnsMut<'_, T, M, N>ⓘ
Returns a mutable iterator over the columns in this matrix.
sourcepub fn map<F, U>(self, f: F) -> Matrix<U, M, N>where
F: FnMut(T) -> U,
pub fn map<F, U>(self, f: F) -> Matrix<U, M, N>where
F: FnMut(T) -> U,
Returns a matrix of the same size as self, with function f
applied to
each element in column-major order.
sourcepub fn l1_norm(&self) -> Twhere
T: Copy + Ord + Abs + Zero + Sum<T>,
pub fn l1_norm(&self) -> Twhere
T: Copy + Ord + Abs + Zero + Sum<T>,
Returns the L1 norm of the matrix.
Also known as Manhattan Distance or Taxicab norm. L1 Norm is the sum of the magnitudes of the vectors in a space.
Note
If the matrix is a row vector this method might not do what you what you expect. For example:
let row_vector = matrix![1, 2, 3];
assert_eq!(row_vector.l1_norm(), 3);
let column_vector = matrix![1; 2; 3];
assert_eq!(column_vector.l1_norm(), 6);
Trait Implementations
sourceimpl<T, const M: usize, const N: usize> Add<&Matrix<T, M, N>> for &Matrix<T, M, N>where
T: Copy + Zero + Add<Output = T>,
impl<T, const M: usize, const N: usize> Add<&Matrix<T, M, N>> for &Matrix<T, M, N>where
T: Copy + Zero + Add<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Add<&Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + Add<Output = T>,
impl<T, const M: usize, const N: usize> Add<&Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + Add<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Add<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Add<Output = T>,
impl<T, const M: usize, const N: usize> Add<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Add<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Add<&T> for Matrix<T, M, N>where
T: Copy + Add<Output = T>,
impl<T, const M: usize, const N: usize> Add<&T> for Matrix<T, M, N>where
T: Copy + Add<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Add<Matrix<T, M, N>> for &Matrix<T, M, N>where
T: Copy + Zero + Add<Output = T>,
impl<T, const M: usize, const N: usize> Add<Matrix<T, M, N>> for &Matrix<T, M, N>where
T: Copy + Zero + Add<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Add<Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + Add<Output = T>,
impl<T, const M: usize, const N: usize> Add<Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + Add<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Add<T> for &Matrix<T, M, N>where
T: Copy + Zero + Add<Output = T>,
impl<T, const M: usize, const N: usize> Add<T> for &Matrix<T, M, N>where
T: Copy + Zero + Add<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Add<T> for Matrix<T, M, N>where
T: Copy + Add<Output = T>,
impl<T, const M: usize, const N: usize> Add<T> for Matrix<T, M, N>where
T: Copy + Add<Output = T>,
sourceimpl<T, const M: usize, const N: usize> AddAssign<&Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + AddAssign,
impl<T, const M: usize, const N: usize> AddAssign<&Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + AddAssign,
sourcefn add_assign(&mut self, other: &Matrix<T, M, N>)
fn add_assign(&mut self, other: &Matrix<T, M, N>)
+=
operation. Read moresourceimpl<T, const M: usize, const N: usize> AddAssign<&T> for Matrix<T, M, N>where
T: Copy + AddAssign<T>,
impl<T, const M: usize, const N: usize> AddAssign<&T> for Matrix<T, M, N>where
T: Copy + AddAssign<T>,
sourcefn add_assign(&mut self, other: &T)
fn add_assign(&mut self, other: &T)
+=
operation. Read moresourceimpl<T, const M: usize, const N: usize> AddAssign<Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + AddAssign,
impl<T, const M: usize, const N: usize> AddAssign<Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + AddAssign,
sourcefn add_assign(&mut self, other: Matrix<T, M, N>)
fn add_assign(&mut self, other: Matrix<T, M, N>)
+=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> AddAssign<T> for Matrix<T, M, N>where
T: Copy + AddAssign<T>,
impl<'a, T, const M: usize, const N: usize> AddAssign<T> for Matrix<T, M, N>where
T: Copy + AddAssign<T>,
sourcefn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
+=
operation. Read moresourceimpl<T, const M: usize, const N: usize> BitAnd<&T> for &Matrix<T, M, N>where
T: Copy + Zero + BitAnd<Output = T>,
impl<T, const M: usize, const N: usize> BitAnd<&T> for &Matrix<T, M, N>where
T: Copy + Zero + BitAnd<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitAnd<&T> for Matrix<T, M, N>where
T: Copy + BitAnd<Output = T>,
impl<T, const M: usize, const N: usize> BitAnd<&T> for Matrix<T, M, N>where
T: Copy + BitAnd<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitAnd<T> for &Matrix<T, M, N>where
T: Copy + Zero + BitAnd<Output = T>,
impl<T, const M: usize, const N: usize> BitAnd<T> for &Matrix<T, M, N>where
T: Copy + Zero + BitAnd<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitAnd<T> for Matrix<T, M, N>where
T: Copy + BitAnd<Output = T>,
impl<T, const M: usize, const N: usize> BitAnd<T> for Matrix<T, M, N>where
T: Copy + BitAnd<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitAndAssign<&T> for Matrix<T, M, N>where
T: Copy + BitAndAssign<T>,
impl<T, const M: usize, const N: usize> BitAndAssign<&T> for Matrix<T, M, N>where
T: Copy + BitAndAssign<T>,
sourcefn bitand_assign(&mut self, other: &T)
fn bitand_assign(&mut self, other: &T)
&=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> BitAndAssign<T> for Matrix<T, M, N>where
T: Copy + BitAndAssign<T>,
impl<'a, T, const M: usize, const N: usize> BitAndAssign<T> for Matrix<T, M, N>where
T: Copy + BitAndAssign<T>,
sourcefn bitand_assign(&mut self, other: T)
fn bitand_assign(&mut self, other: T)
&=
operation. Read moresourceimpl<T, const M: usize, const N: usize> BitOr<&T> for &Matrix<T, M, N>where
T: Copy + Zero + BitOr<Output = T>,
impl<T, const M: usize, const N: usize> BitOr<&T> for &Matrix<T, M, N>where
T: Copy + Zero + BitOr<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitOr<&T> for Matrix<T, M, N>where
T: Copy + BitOr<Output = T>,
impl<T, const M: usize, const N: usize> BitOr<&T> for Matrix<T, M, N>where
T: Copy + BitOr<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitOr<T> for &Matrix<T, M, N>where
T: Copy + Zero + BitOr<Output = T>,
impl<T, const M: usize, const N: usize> BitOr<T> for &Matrix<T, M, N>where
T: Copy + Zero + BitOr<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitOr<T> for Matrix<T, M, N>where
T: Copy + BitOr<Output = T>,
impl<T, const M: usize, const N: usize> BitOr<T> for Matrix<T, M, N>where
T: Copy + BitOr<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitOrAssign<&T> for Matrix<T, M, N>where
T: Copy + BitOrAssign<T>,
impl<T, const M: usize, const N: usize> BitOrAssign<&T> for Matrix<T, M, N>where
T: Copy + BitOrAssign<T>,
sourcefn bitor_assign(&mut self, other: &T)
fn bitor_assign(&mut self, other: &T)
|=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> BitOrAssign<T> for Matrix<T, M, N>where
T: Copy + BitOrAssign<T>,
impl<'a, T, const M: usize, const N: usize> BitOrAssign<T> for Matrix<T, M, N>where
T: Copy + BitOrAssign<T>,
sourcefn bitor_assign(&mut self, other: T)
fn bitor_assign(&mut self, other: T)
|=
operation. Read moresourceimpl<T, const M: usize, const N: usize> BitXor<&T> for &Matrix<T, M, N>where
T: Copy + Zero + BitXor<Output = T>,
impl<T, const M: usize, const N: usize> BitXor<&T> for &Matrix<T, M, N>where
T: Copy + Zero + BitXor<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitXor<&T> for Matrix<T, M, N>where
T: Copy + BitXor<Output = T>,
impl<T, const M: usize, const N: usize> BitXor<&T> for Matrix<T, M, N>where
T: Copy + BitXor<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitXor<T> for &Matrix<T, M, N>where
T: Copy + Zero + BitXor<Output = T>,
impl<T, const M: usize, const N: usize> BitXor<T> for &Matrix<T, M, N>where
T: Copy + Zero + BitXor<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitXor<T> for Matrix<T, M, N>where
T: Copy + BitXor<Output = T>,
impl<T, const M: usize, const N: usize> BitXor<T> for Matrix<T, M, N>where
T: Copy + BitXor<Output = T>,
sourceimpl<T, const M: usize, const N: usize> BitXorAssign<&T> for Matrix<T, M, N>where
T: Copy + BitXorAssign<T>,
impl<T, const M: usize, const N: usize> BitXorAssign<&T> for Matrix<T, M, N>where
T: Copy + BitXorAssign<T>,
sourcefn bitxor_assign(&mut self, other: &T)
fn bitxor_assign(&mut self, other: &T)
^=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> BitXorAssign<T> for Matrix<T, M, N>where
T: Copy + BitXorAssign<T>,
impl<'a, T, const M: usize, const N: usize> BitXorAssign<T> for Matrix<T, M, N>where
T: Copy + BitXorAssign<T>,
sourcefn bitxor_assign(&mut self, other: T)
fn bitxor_assign(&mut self, other: T)
^=
operation. Read moresourceimpl<T: Default, const M: usize, const N: usize> Default for Matrix<T, M, N>
impl<T: Default, const M: usize, const N: usize> Default for Matrix<T, M, N>
sourceimpl<T, const M: usize, const N: usize> Div<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Div<Output = T>,
impl<T, const M: usize, const N: usize> Div<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Div<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Div<&T> for Matrix<T, M, N>where
T: Copy + Div<Output = T>,
impl<T, const M: usize, const N: usize> Div<&T> for Matrix<T, M, N>where
T: Copy + Div<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Div<T> for &Matrix<T, M, N>where
T: Copy + Zero + Div<Output = T>,
impl<T, const M: usize, const N: usize> Div<T> for &Matrix<T, M, N>where
T: Copy + Zero + Div<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Div<T> for Matrix<T, M, N>where
T: Copy + Div<Output = T>,
impl<T, const M: usize, const N: usize> Div<T> for Matrix<T, M, N>where
T: Copy + Div<Output = T>,
sourceimpl<T, const M: usize, const N: usize> DivAssign<&T> for Matrix<T, M, N>where
T: Copy + DivAssign<T>,
impl<T, const M: usize, const N: usize> DivAssign<&T> for Matrix<T, M, N>where
T: Copy + DivAssign<T>,
sourcefn div_assign(&mut self, other: &T)
fn div_assign(&mut self, other: &T)
/=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> DivAssign<T> for Matrix<T, M, N>where
T: Copy + DivAssign<T>,
impl<'a, T, const M: usize, const N: usize> DivAssign<T> for Matrix<T, M, N>where
T: Copy + DivAssign<T>,
sourcefn div_assign(&mut self, other: T)
fn div_assign(&mut self, other: T)
/=
operation. Read moresourceimpl<T, const M: usize, const N: usize> FromIterator<T> for Matrix<T, M, N>
impl<T, const M: usize, const N: usize> FromIterator<T> for Matrix<T, M, N>
sourcefn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = T>,
fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = T>,
Create a new matrix from an iterator.
Elements will be filled in column-major order.
Panics
If the iterator doesn’t yield enough elements to fill the matrix.
sourceimpl<T, I, const M: usize, const N: usize> Index<I> for Matrix<T, M, N>where
I: MatrixIndex<Self>,
impl<T, I, const M: usize, const N: usize> Index<I> for Matrix<T, M, N>where
I: MatrixIndex<Self>,
sourceimpl<T, I, const M: usize, const N: usize> IndexMut<I> for Matrix<T, M, N>where
I: MatrixIndex<Self>,
impl<T, I, const M: usize, const N: usize> IndexMut<I> for Matrix<T, M, N>where
I: MatrixIndex<Self>,
sourceimpl<T, const M: usize, const N: usize> IntoIterator for Matrix<T, M, N>
impl<T, const M: usize, const N: usize> IntoIterator for Matrix<T, M, N>
sourceimpl<T, const M: usize, const N: usize> MatrixIndex<Matrix<T, M, N>> for (usize, usize)
impl<T, const M: usize, const N: usize> MatrixIndex<Matrix<T, M, N>> for (usize, usize)
type Output = T
type Output = T
sourcefn get(self, matrix: &Matrix<T, M, N>) -> Option<&Self::Output>
fn get(self, matrix: &Matrix<T, M, N>) -> Option<&Self::Output>
sourcefn get_mut(self, matrix: &mut Matrix<T, M, N>) -> Option<&mut Self::Output>
fn get_mut(self, matrix: &mut Matrix<T, M, N>) -> Option<&mut Self::Output>
sourceunsafe fn get_unchecked(
self,
matrix: *const Matrix<T, M, N>
) -> *const Self::Output
unsafe fn get_unchecked(
self,
matrix: *const Matrix<T, M, N>
) -> *const Self::Output
sourceunsafe fn get_unchecked_mut(
self,
matrix: *mut Matrix<T, M, N>
) -> *mut Self::Output
unsafe fn get_unchecked_mut(
self,
matrix: *mut Matrix<T, M, N>
) -> *mut Self::Output
sourceimpl<T, const M: usize, const N: usize> MatrixIndex<Matrix<T, M, N>> for usize
impl<T, const M: usize, const N: usize> MatrixIndex<Matrix<T, M, N>> for usize
type Output = T
type Output = T
sourcefn get(self, matrix: &Matrix<T, M, N>) -> Option<&Self::Output>
fn get(self, matrix: &Matrix<T, M, N>) -> Option<&Self::Output>
sourcefn get_mut(self, matrix: &mut Matrix<T, M, N>) -> Option<&mut Self::Output>
fn get_mut(self, matrix: &mut Matrix<T, M, N>) -> Option<&mut Self::Output>
sourceunsafe fn get_unchecked(
self,
matrix: *const Matrix<T, M, N>
) -> *const Self::Output
unsafe fn get_unchecked(
self,
matrix: *const Matrix<T, M, N>
) -> *const Self::Output
sourceunsafe fn get_unchecked_mut(
self,
matrix: *mut Matrix<T, M, N>
) -> *mut Self::Output
unsafe fn get_unchecked_mut(
self,
matrix: *mut Matrix<T, M, N>
) -> *mut Self::Output
sourceimpl<T, const N: usize, const M: usize, const P: usize> Mul<&Matrix<T, N, P>> for &Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T> + Sum,
impl<T, const N: usize, const M: usize, const P: usize> Mul<&Matrix<T, N, P>> for &Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T> + Sum,
sourceimpl<T, const N: usize, const M: usize, const P: usize> Mul<&Matrix<T, N, P>> for Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T> + Sum,
impl<T, const N: usize, const M: usize, const P: usize> Mul<&Matrix<T, N, P>> for Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T> + Sum,
sourceimpl<T, const M: usize, const N: usize> Mul<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T>,
impl<T, const M: usize, const N: usize> Mul<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Mul<&T> for Matrix<T, M, N>where
T: Copy + Mul<Output = T>,
impl<T, const M: usize, const N: usize> Mul<&T> for Matrix<T, M, N>where
T: Copy + Mul<Output = T>,
sourceimpl<T, const N: usize, const M: usize, const P: usize> Mul<Matrix<T, N, P>> for &Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T> + Sum,
impl<T, const N: usize, const M: usize, const P: usize> Mul<Matrix<T, N, P>> for &Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T> + Sum,
sourceimpl<T, const N: usize, const M: usize, const P: usize> Mul<Matrix<T, N, P>> for Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T> + Sum,
impl<T, const N: usize, const M: usize, const P: usize> Mul<Matrix<T, N, P>> for Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T> + Sum,
sourceimpl<T, const M: usize, const N: usize> Mul<T> for &Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T>,
impl<T, const M: usize, const N: usize> Mul<T> for &Matrix<T, M, N>where
T: Copy + Zero + Mul<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Mul<T> for Matrix<T, M, N>where
T: Copy + Mul<Output = T>,
impl<T, const M: usize, const N: usize> Mul<T> for Matrix<T, M, N>where
T: Copy + Mul<Output = T>,
sourceimpl<T, const M: usize, const N: usize> MulAssign<&T> for Matrix<T, M, N>where
T: Copy + MulAssign<T>,
impl<T, const M: usize, const N: usize> MulAssign<&T> for Matrix<T, M, N>where
T: Copy + MulAssign<T>,
sourcefn mul_assign(&mut self, other: &T)
fn mul_assign(&mut self, other: &T)
*=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> MulAssign<T> for Matrix<T, M, N>where
T: Copy + MulAssign<T>,
impl<'a, T, const M: usize, const N: usize> MulAssign<T> for Matrix<T, M, N>where
T: Copy + MulAssign<T>,
sourcefn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
*=
operation. Read moresourceimpl<T, const M: usize, const N: usize> Neg for &Matrix<T, M, N>where
T: Copy + Zero + Neg<Output = T>,
impl<T, const M: usize, const N: usize> Neg for &Matrix<T, M, N>where
T: Copy + Zero + Neg<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Neg for Matrix<T, M, N>where
T: Copy + Zero + Neg<Output = T>,
impl<T, const M: usize, const N: usize> Neg for Matrix<T, M, N>where
T: Copy + Zero + Neg<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Not for &Matrix<T, M, N>where
T: Copy + Zero + Not<Output = T>,
impl<T, const M: usize, const N: usize> Not for &Matrix<T, M, N>where
T: Copy + Zero + Not<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Not for Matrix<T, M, N>where
T: Copy + Zero + Not<Output = T>,
impl<T, const M: usize, const N: usize> Not for Matrix<T, M, N>where
T: Copy + Zero + Not<Output = T>,
sourceimpl<T: Ord, const M: usize, const N: usize> Ord for Matrix<T, M, N>
impl<T: Ord, const M: usize, const N: usize> Ord for Matrix<T, M, N>
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl<T: PartialEq, const M: usize, const N: usize> PartialEq<Matrix<T, M, N>> for Matrix<T, M, N>
impl<T: PartialEq, const M: usize, const N: usize> PartialEq<Matrix<T, M, N>> for Matrix<T, M, N>
sourceimpl<T: PartialOrd, const M: usize, const N: usize> PartialOrd<Matrix<T, M, N>> for Matrix<T, M, N>
impl<T: PartialOrd, const M: usize, const N: usize> PartialOrd<Matrix<T, M, N>> for Matrix<T, M, N>
sourcefn partial_cmp(&self, other: &Matrix<T, M, N>) -> Option<Ordering>
fn partial_cmp(&self, other: &Matrix<T, M, N>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl<T, const M: usize, const N: usize> Rem<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Rem<Output = T>,
impl<T, const M: usize, const N: usize> Rem<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Rem<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Rem<&T> for Matrix<T, M, N>where
T: Copy + Rem<Output = T>,
impl<T, const M: usize, const N: usize> Rem<&T> for Matrix<T, M, N>where
T: Copy + Rem<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Rem<T> for &Matrix<T, M, N>where
T: Copy + Zero + Rem<Output = T>,
impl<T, const M: usize, const N: usize> Rem<T> for &Matrix<T, M, N>where
T: Copy + Zero + Rem<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Rem<T> for Matrix<T, M, N>where
T: Copy + Rem<Output = T>,
impl<T, const M: usize, const N: usize> Rem<T> for Matrix<T, M, N>where
T: Copy + Rem<Output = T>,
sourceimpl<T, const M: usize, const N: usize> RemAssign<&T> for Matrix<T, M, N>where
T: Copy + RemAssign<T>,
impl<T, const M: usize, const N: usize> RemAssign<&T> for Matrix<T, M, N>where
T: Copy + RemAssign<T>,
sourcefn rem_assign(&mut self, other: &T)
fn rem_assign(&mut self, other: &T)
%=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> RemAssign<T> for Matrix<T, M, N>where
T: Copy + RemAssign<T>,
impl<'a, T, const M: usize, const N: usize> RemAssign<T> for Matrix<T, M, N>where
T: Copy + RemAssign<T>,
sourcefn rem_assign(&mut self, other: T)
fn rem_assign(&mut self, other: T)
%=
operation. Read moresourceimpl<T, const M: usize, const N: usize> Shl<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Shl<Output = T>,
impl<T, const M: usize, const N: usize> Shl<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Shl<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Shl<&T> for Matrix<T, M, N>where
T: Copy + Shl<Output = T>,
impl<T, const M: usize, const N: usize> Shl<&T> for Matrix<T, M, N>where
T: Copy + Shl<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Shl<T> for &Matrix<T, M, N>where
T: Copy + Zero + Shl<Output = T>,
impl<T, const M: usize, const N: usize> Shl<T> for &Matrix<T, M, N>where
T: Copy + Zero + Shl<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Shl<T> for Matrix<T, M, N>where
T: Copy + Shl<Output = T>,
impl<T, const M: usize, const N: usize> Shl<T> for Matrix<T, M, N>where
T: Copy + Shl<Output = T>,
sourceimpl<T, const M: usize, const N: usize> ShlAssign<&T> for Matrix<T, M, N>where
T: Copy + ShlAssign<T>,
impl<T, const M: usize, const N: usize> ShlAssign<&T> for Matrix<T, M, N>where
T: Copy + ShlAssign<T>,
sourcefn shl_assign(&mut self, other: &T)
fn shl_assign(&mut self, other: &T)
<<=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> ShlAssign<T> for Matrix<T, M, N>where
T: Copy + ShlAssign<T>,
impl<'a, T, const M: usize, const N: usize> ShlAssign<T> for Matrix<T, M, N>where
T: Copy + ShlAssign<T>,
sourcefn shl_assign(&mut self, other: T)
fn shl_assign(&mut self, other: T)
<<=
operation. Read moresourceimpl<T, const M: usize, const N: usize> Shr<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Shr<Output = T>,
impl<T, const M: usize, const N: usize> Shr<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Shr<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Shr<&T> for Matrix<T, M, N>where
T: Copy + Shr<Output = T>,
impl<T, const M: usize, const N: usize> Shr<&T> for Matrix<T, M, N>where
T: Copy + Shr<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Shr<T> for &Matrix<T, M, N>where
T: Copy + Zero + Shr<Output = T>,
impl<T, const M: usize, const N: usize> Shr<T> for &Matrix<T, M, N>where
T: Copy + Zero + Shr<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Shr<T> for Matrix<T, M, N>where
T: Copy + Shr<Output = T>,
impl<T, const M: usize, const N: usize> Shr<T> for Matrix<T, M, N>where
T: Copy + Shr<Output = T>,
sourceimpl<T, const M: usize, const N: usize> ShrAssign<&T> for Matrix<T, M, N>where
T: Copy + ShrAssign<T>,
impl<T, const M: usize, const N: usize> ShrAssign<&T> for Matrix<T, M, N>where
T: Copy + ShrAssign<T>,
sourcefn shr_assign(&mut self, other: &T)
fn shr_assign(&mut self, other: &T)
>>=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> ShrAssign<T> for Matrix<T, M, N>where
T: Copy + ShrAssign<T>,
impl<'a, T, const M: usize, const N: usize> ShrAssign<T> for Matrix<T, M, N>where
T: Copy + ShrAssign<T>,
sourcefn shr_assign(&mut self, other: T)
fn shr_assign(&mut self, other: T)
>>=
operation. Read moresourceimpl<T, const M: usize, const N: usize> Sub<&Matrix<T, M, N>> for &Matrix<T, M, N>where
T: Copy + Zero + Sub<Output = T>,
impl<T, const M: usize, const N: usize> Sub<&Matrix<T, M, N>> for &Matrix<T, M, N>where
T: Copy + Zero + Sub<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Sub<&Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + Sub<Output = T>,
impl<T, const M: usize, const N: usize> Sub<&Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + Sub<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Sub<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Sub<Output = T>,
impl<T, const M: usize, const N: usize> Sub<&T> for &Matrix<T, M, N>where
T: Copy + Zero + Sub<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Sub<&T> for Matrix<T, M, N>where
T: Copy + Sub<Output = T>,
impl<T, const M: usize, const N: usize> Sub<&T> for Matrix<T, M, N>where
T: Copy + Sub<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Sub<Matrix<T, M, N>> for &Matrix<T, M, N>where
T: Copy + Zero + Sub<Output = T>,
impl<T, const M: usize, const N: usize> Sub<Matrix<T, M, N>> for &Matrix<T, M, N>where
T: Copy + Zero + Sub<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Sub<Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + Sub<Output = T>,
impl<T, const M: usize, const N: usize> Sub<Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + Sub<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Sub<T> for &Matrix<T, M, N>where
T: Copy + Zero + Sub<Output = T>,
impl<T, const M: usize, const N: usize> Sub<T> for &Matrix<T, M, N>where
T: Copy + Zero + Sub<Output = T>,
sourceimpl<T, const M: usize, const N: usize> Sub<T> for Matrix<T, M, N>where
T: Copy + Sub<Output = T>,
impl<T, const M: usize, const N: usize> Sub<T> for Matrix<T, M, N>where
T: Copy + Sub<Output = T>,
sourceimpl<T, const M: usize, const N: usize> SubAssign<&Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + SubAssign,
impl<T, const M: usize, const N: usize> SubAssign<&Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + SubAssign,
sourcefn sub_assign(&mut self, other: &Matrix<T, M, N>)
fn sub_assign(&mut self, other: &Matrix<T, M, N>)
-=
operation. Read moresourceimpl<T, const M: usize, const N: usize> SubAssign<&T> for Matrix<T, M, N>where
T: Copy + SubAssign<T>,
impl<T, const M: usize, const N: usize> SubAssign<&T> for Matrix<T, M, N>where
T: Copy + SubAssign<T>,
sourcefn sub_assign(&mut self, other: &T)
fn sub_assign(&mut self, other: &T)
-=
operation. Read moresourceimpl<T, const M: usize, const N: usize> SubAssign<Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + SubAssign,
impl<T, const M: usize, const N: usize> SubAssign<Matrix<T, M, N>> for Matrix<T, M, N>where
T: Copy + SubAssign,
sourcefn sub_assign(&mut self, other: Matrix<T, M, N>)
fn sub_assign(&mut self, other: Matrix<T, M, N>)
-=
operation. Read moresourceimpl<'a, T, const M: usize, const N: usize> SubAssign<T> for Matrix<T, M, N>where
T: Copy + SubAssign<T>,
impl<'a, T, const M: usize, const N: usize> SubAssign<T> for Matrix<T, M, N>where
T: Copy + SubAssign<T>,
sourcefn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
-=
operation. Read more