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 VectorRef<E, N>) -> Self
pub fn from_row_major<const N: usize>(scalars: impl VectorRef<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 VectorRef<E, N>) -> Self
pub fn from_column_major<const N: usize>(scalars: impl VectorRef<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>
pub fn raw_slice(&self) -> &[<Self as Collection>::Scalar]
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,
pub fn raw_slice_mut(&mut self) -> &mut [<Self as Collection>::Scalar]
pub fn raw_set_slice(&mut self, scalars: &[<Self as Collection>::Scalar])
pub fn raw_set<const N: usize>( self, scalars: [<Self as Collection>::Scalar; N], ) -> Self
pub fn set<const N: usize>( self, scalars: [<Self as Collection>::Scalar; N], ) -> Self
pub fn with_row_major(self, scalars: &[<Self as Collection>::Scalar]) -> Self
pub fn with_column_major(self, scalars: &[<Self as Collection>::Scalar]) -> Self
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>
pub fn lane_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &<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)>
pub fn iter_unstable( &self, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>
pub fn iter_indexed_unstable( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
pub fn iter_lsfirst( &self, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>
pub fn iter_indexed_lsfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>
pub fn iter_msfirst( &self, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>
pub fn iter_indexed_msfirst( &self, ) -> impl Iterator<Item = (<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>
pub fn lane_iter_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &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)>
pub fn iter_unstable_mut( &mut self, ) -> impl Iterator<Item = &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)>
pub fn iter_lsfirst_mut( &mut self, ) -> impl Iterator<Item = &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)>
pub fn iter_msfirst_mut( &mut self, ) -> impl Iterator<Item = &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)>
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>
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>
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,
pub fn scalar_offset(index: <Self as Indexable>::Index) -> usize
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>,
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
Trait Implementations§
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)
Performs the
/= operation. Read moreSource§impl<const ROWS: usize, const COLS: usize, E, Descriptor> From<([[E; COLS]; ROWS], PhantomData<Descriptor>)> for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<const ROWS: usize, const COLS: usize, E, Descriptor> From<([[E; COLS]; ROWS], PhantomData<Descriptor>)> for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Source§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>
Iterate over scalars of a single 1D lane with mutable access. Read more
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)>
Iterate over scalars of a single 1D lane with indices and mutable access. Read more
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>
Iterate over all scalars with mutable access. Order of iteration is not specified. Read more
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)>
Iterate over all scalars with indices and mutable access. Order of iteration is not specified. Read more
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>
Iterate over all scalars in least significant dimension order with mutable access. Read more
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)>
Iterate over all scalars with indices in least significant dimension order with mutable access. Read more
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>
Iterate over scalars of a single 1D lane with mutable access. Read more
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)>
Iterate over scalars of a single 1D lane with indices and mutable access. Read more
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>
Iterate over all scalars with mutable access. Order of iteration is not specified. Read more
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)>
Iterate over all scalars with indices and mutable access. Order of iteration is not specified. Read more
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>
Iterate over all scalars in least significant dimension order with mutable access. Read more
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)>
Iterate over all scalars with indices in least significant dimension order with mutable access. Read more
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>
Iterate over scalars of a single 1D lane. Read more
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)>
Iterate over scalars of a single 1D lane with indices. Read more
Source§fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>
fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>
Iterate over all scalars. Order of iteration is not specified. Read more
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)>
Iterate over all scalars with indices. Order of iteration is not specified. Read more
Source§fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>
fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>
Iterate over all scalars in least significant dimension order. Read more
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)>
Iterate over all scalars with indices in least significant dimension order. Read more
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>
Iterate over scalars of a single 1D lane. Read more
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)>
Iterate over scalars of a single 1D lane with indices. Read more
Source§fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>
fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>
Iterate over all scalars. Order of iteration is not specified. Read more
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)>
Iterate over all scalars with indices. Order of iteration is not specified. Read more
Source§fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>
fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>
Iterate over all scalars in least significant dimension order. Read more
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)>
Iterate over all scalars with indices in least significant dimension order. Read more
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>)
Performs the
*= 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]
Returns a mutable reference to the underlying data as a flat array. Read more
Source§fn raw_set_slice(&mut self, scalars: &[Self::Scalar])
fn raw_set_slice(&mut self, scalars: &[Self::Scalar])
Sets the underlying data from a slice of scalars. Read more
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
Sets the underlying data from an array of scalars. Read more
Source§fn with_row_major(self, scalars: &[Self::Scalar]) -> Self
fn with_row_major(self, scalars: &[Self::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. Read more
Source§fn with_column_major(self, scalars: &[Self::Scalar]) -> Self
fn with_column_major(self, scalars: &[Self::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. Read more
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]
Returns a mutable reference to the underlying data as a flat array. Read more
Source§fn raw_set_slice(&mut self, scalars: &[Self::Scalar])
fn raw_set_slice(&mut self, scalars: &[Self::Scalar])
Sets the underlying data from a slice of scalars. Read more
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
Sets the underlying data from an array of scalars. Read more
Source§fn with_row_major(self, scalars: &[Self::Scalar]) -> Self
fn with_row_major(self, scalars: &[Self::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. Read more
Source§fn with_column_major(self, scalars: &[Self::Scalar]) -> Self
fn with_column_major(self, scalars: &[Self::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. Read more
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> ScalarMut for Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> ScalarMut for Mat<ROWS, COLS, E, Descriptor>
Source§impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> ScalarRef for Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> ScalarRef for Mat<ROWS, COLS, E, Descriptor>
impl<const ROWS: usize, const COLS: usize, E, Descriptor: Copy> Copy for Mat<ROWS, COLS, E, Descriptor>
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> MatWithShape<ROWS, COLS> for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> MatWithShapeMut<ROWS, COLS> for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
impl<const ROWS: usize, const COLS: usize, E, Descriptor> StructuralPartialEq for Mat<ROWS, COLS, E, Descriptor>where
E: MatEl,
Auto Trait Implementations§
impl<const ROWS: usize, const COLS: usize, E, Descriptor> Freeze for Mat<ROWS, COLS, E, Descriptor>where
E: Freeze,
impl<const ROWS: usize, const COLS: usize, E, Descriptor> RefUnwindSafe for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: RefUnwindSafe,
E: RefUnwindSafe,
impl<const ROWS: usize, const COLS: usize, E, Descriptor> Send for Mat<ROWS, COLS, E, Descriptor>
impl<const ROWS: usize, const COLS: usize, E, Descriptor> Sync for Mat<ROWS, COLS, E, Descriptor>
impl<const ROWS: usize, const COLS: usize, E, Descriptor> Unpin for Mat<ROWS, COLS, E, Descriptor>
impl<const ROWS: usize, const COLS: usize, E, Descriptor> UnwindSafe for Mat<ROWS, COLS, E, Descriptor>where
Descriptor: UnwindSafe,
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more