Trait IndexingMut

Source
pub trait IndexingMut: IndexingRef {
    // Required methods
    fn lane_iter_mut(
        &mut self,
        varying_dim: usize,
        lane: usize,
    ) -> impl Iterator<Item = &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)>;
    fn iter_unstable_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>;
    fn iter_indexed_unstable_mut(
        &mut self,
    ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>;
    fn iter_lsfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>;
    fn iter_indexed_lsfirst_mut(
        &mut self,
    ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>;
    fn iter_msfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>;
    fn iter_indexed_msfirst_mut(
        &mut self,
    ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>;
}
Expand description

Trait for indexing and iterating over matrix elements with mutable access.

Required Methods§

Source

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.

§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 mutable references to the scalars in the specified lane.
Source

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.

§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.
Source

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.

§Returns
  • An iterator over mutable references to all scalars in the matrix.
Source

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.

§Returns
  • An iterator over tuples of indices and mutable references to all scalars in the matrix.
Source

fn iter_lsfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::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.
Source

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.

§Returns
  • An iterator over tuples of indices and mutable references to all scalars in the matrix.
Source

fn iter_msfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::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.
Source

fn iter_indexed_msfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<E, const ROWS: usize, const COLS: usize> IndexingMut for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>
where E: MatEl + NdFloat,

Source§

impl<E, const ROWS: usize, const COLS: usize> IndexingMut for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>
where E: MatEl + NdFloat,