pub struct Mat<const ROWS: usize, const COLS: usize, E, Descriptor>(/* private fields */)
where
E: MatEl;Expand description
A matrix structure.
Implementations§
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Sourcepub fn as_mut_ptr(&mut self) -> *mut E
pub fn as_mut_ptr(&mut self) -> *mut E
Returns an unsafe mutable pointer to the slice’s buffer.
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Self: RawSliceMut<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Self: RawSliceMut<Scalar = E>,
Sourcepub fn from_row_major<const N: usize>(scalars: impl ArrayRef<E, N>) -> Self
pub fn from_row_major<const N: usize>(scalars: impl ArrayRef<E, N>) -> Self
Creates a matrix assuming the input to be in row major order
Sourcepub fn from_column_major<const N: usize>(scalars: impl ArrayRef<E, N>) -> Self
pub fn from_column_major<const N: usize>(scalars: impl ArrayRef<E, N>) -> Self
Creates a matrix assuming the input to be in column major order
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
Sourcepub fn raw_slice(&self) -> &[<Self as Collection>::Scalar]
pub fn raw_slice(&self) -> &[<Self as Collection>::Scalar]
Returns a reference to the underlying data as a flat array.
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Self: RawSliceMut,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Self: RawSliceMut,
Sourcepub fn as_raw_slice_mut(&mut self) -> &mut [<Self as Collection>::Scalar]
pub fn as_raw_slice_mut(&mut self) -> &mut [<Self as Collection>::Scalar]
Returns a mutable reference to the underlying data as a flat array.
§Returns
- A mutable slice of the scalar data.
Sourcepub fn set_raw_slice(&mut self, scalars: &[<Self as Collection>::Scalar])
pub fn set_raw_slice(&mut self, scalars: &[<Self as Collection>::Scalar])
Sets the underlying data from a slice of scalars.
§Arguments
scalars: A slice of scalars to set the data.
Sourcepub fn set_raw<const N: usize>(
self,
scalars: [<Self as Collection>::Scalar; N],
) -> Self
pub fn set_raw<const N: usize>( self, scalars: [<Self as Collection>::Scalar; N], ) -> Self
Sets the underlying data from an array of scalars.
§Arguments
scalars: An array of scalars to set the data.
Sourcepub fn set_data<const N: usize>(
self,
scalars: [<Self as Collection>::Scalar; N],
) -> Self
pub fn set_data<const N: usize>( self, scalars: [<Self as Collection>::Scalar; N], ) -> Self
Sets the underlying data from an array of scalars, assuming the input to be in row major order. The resulting data will conform to the type of matrix used - row major or column major.
§Arguments
scalars: An array of scalars to set the data.
Sourcepub fn set_row_major(self, scalars: &[<Self as Collection>::Scalar]) -> Self
pub fn set_row_major(self, scalars: &[<Self as Collection>::Scalar]) -> Self
Sets the underlying data from an array of scalars, assuming the input to be in row major order. The resulting data will conform to the type of matrix used - row major or column major.
§Arguments
scalars: An array of scalars to set the data.
Sourcepub fn set_column_major(self, scalars: &[<Self as Collection>::Scalar]) -> Self
pub fn set_column_major(self, scalars: &[<Self as Collection>::Scalar]) -> Self
Sets the underlying data from an array of scalars, assuming the input to be in column major order. The resulting data will conform to the type of matrix used - row major or column major.
/// # Arguments
scalars: An array of scalars to set the data.
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
Sourcepub fn lane_iter(
&self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = &<Self as Collection>::Scalar>
pub fn lane_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>
Sourcepub fn lane_indexed_iter(
&self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
pub fn lane_indexed_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
Sourcepub fn iter_unstable(
&self,
) -> impl Iterator<Item = &<Self as Collection>::Scalar>
pub fn iter_unstable( &self, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>
Iterate over all scalars. Order of iteration is not specified.
§Returns
- An iterator over references to all scalars in the matrix.
Sourcepub fn iter_indexed_unstable(
&self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
pub fn iter_indexed_unstable( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
Iterate over all scalars with indices. Order of iteration is not specified.
§Returns
- An iterator over tuples of indices and references to all scalars in the matrix.
Sourcepub fn iter_lsfirst(
&self,
) -> impl Iterator<Item = &<Self as Collection>::Scalar>
pub fn iter_lsfirst( &self, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>
Iterate over all scalars in least significant dimension order.
§Returns
- An iterator over references to all scalars in the matrix.
Sourcepub fn iter_indexed_lsfirst(
&self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
pub fn iter_indexed_lsfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
Iterate over all scalars with indices in least significant dimension order.
§Returns
- An iterator over tuples of indices and references to all scalars in the matrix.
Sourcepub fn iter_msfirst(
&self,
) -> impl Iterator<Item = &<Self as Collection>::Scalar>
pub fn iter_msfirst( &self, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>
Iterate over all scalars in most significant dimension order.
§Returns
- An iterator over references to all scalars in the matrix.
Sourcepub fn iter_indexed_msfirst(
&self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
pub fn iter_indexed_msfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
Iterate over all scalars with indices in most significant dimension order.
§Returns
- An iterator over tuples of indices and references to all scalars in the matrix.
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
Sourcepub fn lane_iter_mut(
&mut self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>
pub fn lane_iter_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>
Sourcepub fn lane_iter_indexed_mut(
&mut self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>
pub fn lane_iter_indexed_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>
Iterate over scalars of a single 1D lane with indices and mutable access.
§Parameters
varying_dim: The dimension that varies (0 for rows, 1 for columns).lane: The index of the lane (row or column) to iterate over.
§Returns
- An iterator over tuples of indices and mutable references to the scalars in the specified lane.
Sourcepub fn iter_unstable_mut(
&mut self,
) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>
pub fn iter_unstable_mut( &mut self, ) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>
Iterate over all scalars with mutable access. Order of iteration is not specified.
§Returns
- An iterator over mutable references to all scalars in the matrix.
Sourcepub fn iter_indexed_unstable_mut(
&mut self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>
pub fn iter_indexed_unstable_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>
Iterate over all scalars with indices and mutable access. Order of iteration is not specified.
§Returns
- An iterator over tuples of indices and mutable references to all scalars in the matrix.
Sourcepub fn iter_lsfirst_mut(
&mut self,
) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>
pub fn iter_lsfirst_mut( &mut self, ) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>
Iterate over all scalars in least significant dimension order with mutable access.
§Returns
- An iterator over mutable references to all scalars in the matrix.
Sourcepub fn iter_indexed_lsfirst_mut(
&mut self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>
pub fn iter_indexed_lsfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>
Iterate over all scalars with indices in least significant dimension order with mutable access.
§Returns
- An iterator over tuples of indices and mutable references to all scalars in the matrix.
Sourcepub fn iter_msfirst_mut(
&mut self,
) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>
pub fn iter_msfirst_mut( &mut self, ) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>
Iterate over all scalars in most significant dimension order with mutable access.
§Returns
- An iterator over mutable references to all scalars in the matrix.
Sourcepub fn iter_indexed_msfirst_mut(
&mut self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>
pub fn iter_indexed_msfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>
Iterate over all scalars with indices in most significant dimension order with mutable access.
§Returns
- An iterator over tuples of indices and mutable references to all scalars in the matrix.
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
Sourcepub fn scalar_ref(
&self,
index: <Self as Indexable>::Index,
) -> &<Self as Collection>::Scalar
pub fn scalar_ref( &self, index: <Self as Indexable>::Index, ) -> &<Self as Collection>::Scalar
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
Sourcepub fn scalar_mut(
&mut self,
index: <Self as Indexable>::Index,
) -> &mut <Self as Collection>::Scalar
pub fn scalar_mut( &mut self, index: <Self as Indexable>::Index, ) -> &mut <Self as Collection>::Scalar
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Self: ConstLayout,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Self: ConstLayout,
Sourcepub fn scalar_offset(index: <Self as Indexable>::Index) -> usize
pub fn scalar_offset(index: <Self as Indexable>::Index) -> usize
Get offset for a specified scalar from beginning of underlying buffer.
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Sourcepub fn transpose(&self) -> Mat<COLS, ROWS, E, Descriptor>where
E: NdFloat + Default + Copy,
Self: IndexingRef<Scalar = E>,
Mat<COLS, ROWS, E, Descriptor>: IndexingMut<Scalar = E>,
pub fn transpose(&self) -> Mat<COLS, ROWS, E, Descriptor>where
E: NdFloat + Default + Copy,
Self: IndexingRef<Scalar = E>,
Mat<COLS, ROWS, E, Descriptor>: IndexingMut<Scalar = E>,
Transpose, rarranging data in memory, not just shape descriptor.
Source§impl<E, Descriptor> Mat<2, 2, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Self: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
impl<E, Descriptor> Mat<2, 2, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Self: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
Sourcepub fn determinant(&self) -> E
pub fn determinant(&self) -> E
Computes the determinant of the matrix
Source§impl<E, Descriptor> Mat<3, 3, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Self: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
impl<E, Descriptor> Mat<3, 3, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Self: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
Sourcepub fn determinant(&self) -> E
pub fn determinant(&self) -> E
Computes the determinant of the matrix
Sourcepub fn inverse(&self) -> Option<Self>
pub fn inverse(&self) -> Option<Self>
Computes the inverse of the matrix.
If the determinant is zero - return None
Sourcepub fn from_scale_rotation_translation<Vec>(
scale: Vec,
rotation: E,
translation: Vec,
) -> Selfwhere
Vec: VectorIter<E, 2>,
pub fn from_scale_rotation_translation<Vec>(
scale: Vec,
rotation: E,
translation: Vec,
) -> Selfwhere
Vec: VectorIter<E, 2>,
Creates a transformation matrix from scale, rotation( angle ) and translation
Source§impl<E, Descriptor> Mat<3, 3, E, Descriptor>
impl<E, Descriptor> Mat<3, 3, E, Descriptor>
Sourcepub fn to_homogenous(&self) -> Mat4<E, Descriptor>where
Mat4<E, Descriptor>: RawSliceMut<Scalar = E>,
pub fn to_homogenous(&self) -> Mat4<E, Descriptor>where
Mat4<E, Descriptor>: RawSliceMut<Scalar = E>,
Converts the matrix to a 4x4 homogenous matrix
Sourcepub fn truncate(&self) -> Mat<2, 2, E, Descriptor>where
Mat<2, 2, E, Descriptor>: RawSliceMut<Scalar = E>,
pub fn truncate(&self) -> Mat<2, 2, E, Descriptor>where
Mat<2, 2, E, Descriptor>: RawSliceMut<Scalar = E>,
Convertes this matrix into the 3x3 matrix
Source§impl<E, Descriptor> Mat<4, 4, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Self: ScalarMut<Scalar = E, Index = Ix2> + RawSliceMut<Scalar = E> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
impl<E, Descriptor> Mat<4, 4, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Self: ScalarMut<Scalar = E, Index = Ix2> + RawSliceMut<Scalar = E> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
Sourcepub fn determinant(&self) -> Ewhere
Mat<3, 3, E, Descriptor>: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
pub fn determinant(&self) -> Ewhere
Mat<3, 3, E, Descriptor>: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
Computes the determinant of the matrix
Sourcepub fn inverse(&self) -> Option<Self>where
Mat<3, 3, E, Descriptor>: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
pub fn inverse(&self) -> Option<Self>where
Mat<3, 3, E, Descriptor>: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,
Computes the inverse of the matrix.
If the determinant is zero - return None
Source§impl<E, Descriptor> Mat<4, 4, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Self: ScalarMut<Scalar = E> + IndexingMut<Scalar = E, Index = Ix2>,
impl<E, Descriptor> Mat<4, 4, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Self: ScalarMut<Scalar = E> + IndexingMut<Scalar = E, Index = Ix2>,
Sourcepub fn from_scale_rotation_translation<Vec, Q>(
scale: Vec,
rotation: Q,
translation: Vec,
) -> Self
pub fn from_scale_rotation_translation<Vec, Q>( scale: Vec, rotation: Q, translation: Vec, ) -> Self
Creates a transformation matrix from scale, rotation and translation
Trait Implementations§
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor> AbsDiffEq for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: PartialEq + Descriptor,
Self: Collection<Scalar = E>,
Mat<ROWS, COLS, E, Descriptor>: RawSlice,
E: AbsDiffEq + MatEl,
E::Epsilon: Copy,
impl<E, const ROWS: usize, const COLS: usize, Descriptor> AbsDiffEq for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: PartialEq + Descriptor,
Self: Collection<Scalar = E>,
Mat<ROWS, COLS, E, Descriptor>: RawSlice,
E: AbsDiffEq + MatEl,
E::Epsilon: Copy,
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
AbsDiffEq::abs_diff_eq.Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor> Add<&Mat<ROWS, COLS, E, Descriptor>> for &Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize, Descriptor> Add<&Mat<ROWS, COLS, E, Descriptor>> for &Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor> Add for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize, Descriptor> Add for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl + NdFloat,
Descriptor: Descriptor,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,
Source§impl<const ROWS: usize, const COLS: usize, E, Descriptor: Clone> Clone for Mat<ROWS, COLS, E, Descriptor>
impl<const ROWS: usize, const COLS: usize, E, Descriptor: Clone> Clone for Mat<ROWS, COLS, E, Descriptor>
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Collection for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Collection for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Source§impl<E, const ROWS: usize, const COLS: usize> ConstLayout for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize> ConstLayout for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>where
E: MatEl,
Source§impl<E, const ROWS: usize, const COLS: usize> ConstLayout for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize> ConstLayout for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>where
E: MatEl,
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Debug for Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Debug for Mat<ROWS, COLS, E, Descriptor>
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Default for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Default for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor> Div<E> for Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor> Div<E> for Mat<ROWS, COLS, E, Descriptor>
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor> DivAssign<E> for Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor> DivAssign<E> for Mat<ROWS, COLS, E, Descriptor>
Source§fn div_assign(&mut self, rhs: E)
fn div_assign(&mut self, rhs: E)
/= operation. Read moreSource§impl<const ROWS: usize, const COLS: usize, E, Descriptor: Hash> Hash for Mat<ROWS, COLS, E, Descriptor>
impl<const ROWS: usize, const COLS: usize, E, Descriptor: Hash> Hash for Mat<ROWS, COLS, E, Descriptor>
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Indexable for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Indexable for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Source§impl<E, const ROWS: usize, const COLS: usize> IndexingMut for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>
impl<E, const ROWS: usize, const COLS: usize> IndexingMut for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>
Source§fn lane_iter_mut(
&mut self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = &mut Self::Scalar>
fn lane_iter_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &mut Self::Scalar>
Source§fn lane_iter_indexed_mut(
&mut self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
fn lane_iter_indexed_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
Source§fn iter_unstable_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>
fn iter_unstable_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>
Source§fn iter_indexed_unstable_mut(
&mut self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
fn iter_indexed_unstable_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
Source§fn iter_lsfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>
fn iter_lsfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>
Source§fn iter_indexed_lsfirst_mut(
&mut self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
fn iter_indexed_lsfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
Source§impl<E, const ROWS: usize, const COLS: usize> IndexingMut for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>
impl<E, const ROWS: usize, const COLS: usize> IndexingMut for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>
Source§fn lane_iter_mut(
&mut self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = &mut Self::Scalar>
fn lane_iter_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &mut Self::Scalar>
Source§fn lane_iter_indexed_mut(
&mut self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
fn lane_iter_indexed_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
Source§fn iter_unstable_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>
fn iter_unstable_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>
Source§fn iter_indexed_unstable_mut(
&mut self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
fn iter_indexed_unstable_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
Source§fn iter_lsfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>
fn iter_lsfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>
Source§fn iter_indexed_lsfirst_mut(
&mut self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
fn iter_indexed_lsfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>
Source§impl<E, const ROWS: usize, const COLS: usize> IndexingRef for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>
impl<E, const ROWS: usize, const COLS: usize> IndexingRef for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>
Source§fn lane_iter(
&self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = &Self::Scalar>
fn lane_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &Self::Scalar>
Source§fn lane_indexed_iter(
&self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
fn lane_indexed_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
Source§fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>
fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>
Source§fn iter_indexed_unstable(
&self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
fn iter_indexed_unstable( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
Source§fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>
fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>
Source§fn iter_indexed_lsfirst(
&self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
fn iter_indexed_lsfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
Source§impl<E, const ROWS: usize, const COLS: usize> IndexingRef for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>
impl<E, const ROWS: usize, const COLS: usize> IndexingRef for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>
Source§fn lane_iter(
&self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = &Self::Scalar>
fn lane_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &Self::Scalar>
Source§fn lane_indexed_iter(
&self,
varying_dim: usize,
lane: usize,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
fn lane_indexed_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
Source§fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>
fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>
Source§fn iter_indexed_unstable(
&self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
fn iter_indexed_unstable( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
Source§fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>
fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>
Source§fn iter_indexed_lsfirst(
&self,
) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
fn iter_indexed_lsfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>
Source§impl<E, const ROWS: usize, const COLS: usize, const COLS2: usize, Descriptor> Mul<&Mat<COLS, COLS2, E, Descriptor>> for &Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,
Mat<COLS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
Mat<ROWS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + ScalarMut<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize, const COLS2: usize, Descriptor> Mul<&Mat<COLS, COLS2, E, Descriptor>> for &Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,
Mat<COLS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
Mat<ROWS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + ScalarMut<Scalar = E>,
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor> Mul<&Vector<E, COLS>> for &Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize, Descriptor> Mul<&Vector<E, COLS>> for &Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
Source§impl<E, const ROWS: usize, const COLS: usize, const COLS2: usize, Descriptor> Mul<Mat<COLS, COLS2, E, Descriptor>> for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,
Mat<COLS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
Mat<ROWS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + ScalarMut<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize, const COLS2: usize, Descriptor> Mul<Mat<COLS, COLS2, E, Descriptor>> for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,
Mat<COLS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
Mat<ROWS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + ScalarMut<Scalar = E>,
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor> Mul<Vector<E, COLS>> for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize, Descriptor> Mul<Vector<E, COLS>> for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor> MulAssign<Mat<ROWS, COLS, E, Descriptor>> for Vector<E, COLS>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize, Descriptor> MulAssign<Mat<ROWS, COLS, E, Descriptor>> for Vector<E, COLS>where
Descriptor: Descriptor,
E: MatEl + NdFloat,
Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,
Source§fn mul_assign(&mut self, rhs: Mat<ROWS, COLS, E, Descriptor>)
fn mul_assign(&mut self, rhs: Mat<ROWS, COLS, E, Descriptor>)
*= operation. Read moreSource§impl<const ROWS: usize, const COLS: usize, E, Descriptor: PartialEq> PartialEq for Mat<ROWS, COLS, E, Descriptor>
impl<const ROWS: usize, const COLS: usize, E, Descriptor: PartialEq> PartialEq for Mat<ROWS, COLS, E, Descriptor>
Source§impl<const ROWS: usize, const COLS: usize, E, Descriptor: PartialOrd> PartialOrd for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl + PartialOrd,
impl<const ROWS: usize, const COLS: usize, E, Descriptor: PartialOrd> PartialOrd for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl + PartialOrd,
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> RawSlice for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> RawSlice for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Source§impl<E, const ROWS: usize, const COLS: usize> RawSliceMut for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>where
E: MatEl,
Self: Collection<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize> RawSliceMut for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>where
E: MatEl,
Self: Collection<Scalar = E>,
Source§fn raw_slice_mut(&mut self) -> &mut [Self::Scalar]
fn raw_slice_mut(&mut self) -> &mut [Self::Scalar]
Source§fn raw_set_slice(&mut self, scalars: &[Self::Scalar])
fn raw_set_slice(&mut self, scalars: &[Self::Scalar])
Source§fn raw_set<const N: usize>(self, scalars: [Self::Scalar; N]) -> Self
fn raw_set<const N: usize>(self, scalars: [Self::Scalar; N]) -> Self
Source§fn with_row_major(self, scalars: &[Self::Scalar]) -> Self
fn with_row_major(self, scalars: &[Self::Scalar]) -> Self
Source§fn with_column_major(self, scalars: &[Self::Scalar]) -> Self
fn with_column_major(self, scalars: &[Self::Scalar]) -> Self
Source§impl<E, const ROWS: usize, const COLS: usize> RawSliceMut for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>where
E: MatEl,
Self: Collection<Scalar = E>,
impl<E, const ROWS: usize, const COLS: usize> RawSliceMut for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>where
E: MatEl,
Self: Collection<Scalar = E>,
Source§fn raw_slice_mut(&mut self) -> &mut [Self::Scalar]
fn raw_slice_mut(&mut self) -> &mut [Self::Scalar]
Source§fn raw_set_slice(&mut self, scalars: &[Self::Scalar])
fn raw_set_slice(&mut self, scalars: &[Self::Scalar])
Source§fn raw_set<const N: usize>(self, scalars: [Self::Scalar; N]) -> Self
fn raw_set<const N: usize>(self, scalars: [Self::Scalar; N]) -> Self
Source§fn with_row_major(self, scalars: &[Self::Scalar]) -> Self
fn with_row_major(self, scalars: &[Self::Scalar]) -> Self
Source§fn with_column_major(self, scalars: &[Self::Scalar]) -> Self
fn with_column_major(self, scalars: &[Self::Scalar]) -> Self
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor> RelativeEq for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: PartialEq + Descriptor,
Self: Collection<Scalar = E>,
Mat<ROWS, COLS, E, Descriptor>: RawSlice,
E: RelativeEq + MatEl,
E::Epsilon: Copy,
impl<E, const ROWS: usize, const COLS: usize, Descriptor> RelativeEq for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: PartialEq + Descriptor,
Self: Collection<Scalar = E>,
Mat<ROWS, COLS, E, Descriptor>: RawSlice,
E: RelativeEq + MatEl,
E::Epsilon: Copy,
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
RelativeEq::relative_eq.