pub type ColMut<'a, T, Rows = usize, RStride = isize> = Col<Mut<'a, T, Rows, RStride>>;Expand description
mutable view over a column vector, similar to a mutable reference to a strided slice
§note
unlike a slice, the data pointed to by ColMut<'_, T> is allowed to be partially or fully
uninitialized under certain conditions. in this case, care must be taken to not perform any
operations that read the uninitialized values, or form references to them, either directly or
indirectly through any of the numerical library routines, unless it is explicitly permitted
Aliased Type§
#[repr(transparent)]pub struct ColMut<'a, T, Rows = usize, RStride = isize>(pub Mut<'a, T, Rows, RStride>);Tuple Fields§
§0: Mut<'a, T, Rows, RStride>Implementations§
Source§impl<'a, T, Rows: Shape, RStride: Stride> ColMut<'a, T, Rows, RStride>
impl<'a, T, Rows: Shape, RStride: Stride> ColMut<'a, T, Rows, RStride>
Sourcepub const unsafe fn from_raw_parts_mut(
ptr: *mut T,
nrows: Rows,
row_stride: RStride,
) -> Self
pub const unsafe fn from_raw_parts_mut( ptr: *mut T, nrows: Rows, row_stride: RStride, ) -> Self
creates a ColMut from pointers to the column vector data, number of rows, and row stride
§safety
this function has the same safety requirements as
[MatMut::from_raw_parts(ptr, nrows, 1, row_stride, 0)]
Sourcepub fn row_stride(&self) -> RStride
pub fn row_stride(&self) -> RStride
returns the row stride of the column, specified in number of elements, not in bytes
Sourcepub fn ptr_at(&self, row: IdxInc<Rows>) -> *const T
pub fn ptr_at(&self, row: IdxInc<Rows>) -> *const T
returns a raw pointer to the element at the given index
Sourcepub unsafe fn ptr_inbounds_at(&self, row: Idx<Rows>) -> *const T
pub unsafe fn ptr_inbounds_at(&self, row: Idx<Rows>) -> *const T
returns a raw pointer to the element at the given index, assuming the provided index is within the column bounds
§safety
the behavior is undefined if any of the following conditions are violated:
row < self.nrows()
Sourcepub fn split_at_row(
self,
row: IdxInc<Rows>,
) -> (ColRef<'a, T, usize, RStride>, ColRef<'a, T, usize, RStride>)
pub fn split_at_row( self, row: IdxInc<Rows>, ) -> (ColRef<'a, T, usize, RStride>, ColRef<'a, T, usize, RStride>)
Sourcepub fn adjoint(self) -> RowRef<'a, T::Conj, Rows, RStride>where
T: Conjugate,
pub fn adjoint(self) -> RowRef<'a, T::Conj, Rows, RStride>where
T: Conjugate,
see ColRef::adjoint
Sourcepub fn get<RowRange>(
self,
row: RowRange,
) -> <ColRef<'a, T, Rows, RStride> as ColIndex<RowRange>>::Target
pub fn get<RowRange>( self, row: RowRange, ) -> <ColRef<'a, T, Rows, RStride> as ColIndex<RowRange>>::Target
see ColRef::get
Sourcepub unsafe fn get_unchecked<RowRange>(
self,
row: RowRange,
) -> <ColRef<'a, T, Rows, RStride> as ColIndex<RowRange>>::Target
pub unsafe fn get_unchecked<RowRange>( self, row: RowRange, ) -> <ColRef<'a, T, Rows, RStride> as ColIndex<RowRange>>::Target
Sourcepub fn reverse_rows(self) -> ColRef<'a, T, Rows, RStride::Rev>
pub fn reverse_rows(self) -> ColRef<'a, T, Rows, RStride::Rev>
Sourcepub fn subrows<V: Shape>(
self,
row_start: IdxInc<Rows>,
nrows: V,
) -> ColRef<'a, T, V, RStride>
pub fn subrows<V: Shape>( self, row_start: IdxInc<Rows>, nrows: V, ) -> ColRef<'a, T, V, RStride>
see ColRef::subrows
Sourcepub fn as_row_shape<V: Shape>(self, nrows: V) -> ColRef<'a, T, V, RStride>
pub fn as_row_shape<V: Shape>(self, nrows: V) -> ColRef<'a, T, V, RStride>
Sourcepub fn as_dyn_rows(self) -> ColRef<'a, T, usize, RStride>
pub fn as_dyn_rows(self) -> ColRef<'a, T, usize, RStride>
Sourcepub fn as_dyn_stride(self) -> ColRef<'a, T, Rows, isize>
pub fn as_dyn_stride(self) -> ColRef<'a, T, Rows, isize>
Sourcepub fn iter(
self,
) -> impl 'a + ExactSizeIterator + DoubleEndedIterator<Item = &'a T>where
Rows: 'a,
pub fn iter(
self,
) -> impl 'a + ExactSizeIterator + DoubleEndedIterator<Item = &'a T>where
Rows: 'a,
see ColRef::iter
Sourcepub fn par_iter(self) -> impl 'a + IndexedParallelIterator<Item = &'a T>where
T: Sync,
Rows: 'a,
pub fn par_iter(self) -> impl 'a + IndexedParallelIterator<Item = &'a T>where
T: Sync,
Rows: 'a,
see ColRef::par_iter
Sourcepub fn par_partition(
self,
count: usize,
) -> impl 'a + IndexedParallelIterator<Item = ColRef<'a, T, usize, RStride>>where
T: Sync,
Rows: 'a,
pub fn par_partition(
self,
count: usize,
) -> impl 'a + IndexedParallelIterator<Item = ColRef<'a, T, usize, RStride>>where
T: Sync,
Rows: 'a,
Sourcepub fn try_as_col_major(self) -> Option<ColRef<'a, T, Rows, ContiguousFwd>>
pub fn try_as_col_major(self) -> Option<ColRef<'a, T, Rows, ContiguousFwd>>
Sourcepub fn try_as_col_major_mut(self) -> Option<ColMut<'a, T, Rows, ContiguousFwd>>
pub fn try_as_col_major_mut(self) -> Option<ColMut<'a, T, Rows, ContiguousFwd>>
Sourcepub fn as_mat_mut(self) -> MatMut<'a, T, Rows, usize, RStride, isize>
pub fn as_mat_mut(self) -> MatMut<'a, T, Rows, usize, RStride, isize>
see ColRef::as_mat
Sourcepub fn as_diagonal(self) -> DiagRef<'a, T, Rows, RStride>
pub fn as_diagonal(self) -> DiagRef<'a, T, Rows, RStride>
Source§impl<'a, T, Rows: Shape, RStride: Stride> ColMut<'a, T, Rows, RStride>
impl<'a, T, Rows: Shape, RStride: Stride> ColMut<'a, T, Rows, RStride>
Sourcepub fn as_ptr_mut(&self) -> *mut T
pub fn as_ptr_mut(&self) -> *mut T
see ColRef::as_ptr
Sourcepub fn ptr_at_mut(&self, row: IdxInc<Rows>) -> *mut T
pub fn ptr_at_mut(&self, row: IdxInc<Rows>) -> *mut T
see ColRef::ptr_at
Sourcepub unsafe fn ptr_inbounds_at_mut(&self, row: Idx<Rows>) -> *mut T
pub unsafe fn ptr_inbounds_at_mut(&self, row: Idx<Rows>) -> *mut T
Sourcepub fn split_at_row_mut(
self,
row: IdxInc<Rows>,
) -> (ColMut<'a, T, usize, RStride>, ColMut<'a, T, usize, RStride>)
pub fn split_at_row_mut( self, row: IdxInc<Rows>, ) -> (ColMut<'a, T, usize, RStride>, ColMut<'a, T, usize, RStride>)
Sourcepub fn transpose_mut(self) -> RowMut<'a, T, Rows, RStride>
pub fn transpose_mut(self) -> RowMut<'a, T, Rows, RStride>
Sourcepub fn conjugate_mut(self) -> ColMut<'a, T::Conj, Rows, RStride>where
T: Conjugate,
pub fn conjugate_mut(self) -> ColMut<'a, T::Conj, Rows, RStride>where
T: Conjugate,
Sourcepub fn canonical_mut(self) -> ColMut<'a, T::Canonical, Rows, RStride>where
T: Conjugate,
pub fn canonical_mut(self) -> ColMut<'a, T::Canonical, Rows, RStride>where
T: Conjugate,
Sourcepub fn adjoint_mut(self) -> RowMut<'a, T::Conj, Rows, RStride>where
T: Conjugate,
pub fn adjoint_mut(self) -> RowMut<'a, T::Conj, Rows, RStride>where
T: Conjugate,
see ColRef::adjoint
Sourcepub fn get_mut<RowRange>(
self,
row: RowRange,
) -> <ColMut<'a, T, Rows, RStride> as ColIndex<RowRange>>::Target
pub fn get_mut<RowRange>( self, row: RowRange, ) -> <ColMut<'a, T, Rows, RStride> as ColIndex<RowRange>>::Target
see ColRef::get
Sourcepub unsafe fn get_mut_unchecked<RowRange>(
self,
row: RowRange,
) -> <ColMut<'a, T, Rows, RStride> as ColIndex<RowRange>>::Target
pub unsafe fn get_mut_unchecked<RowRange>( self, row: RowRange, ) -> <ColMut<'a, T, Rows, RStride> as ColIndex<RowRange>>::Target
Sourcepub fn reverse_rows_mut(self) -> ColMut<'a, T, Rows, RStride::Rev>
pub fn reverse_rows_mut(self) -> ColMut<'a, T, Rows, RStride::Rev>
Sourcepub fn subrows_mut<V: Shape>(
self,
row_start: IdxInc<Rows>,
nrows: V,
) -> ColMut<'a, T, V, RStride>
pub fn subrows_mut<V: Shape>( self, row_start: IdxInc<Rows>, nrows: V, ) -> ColMut<'a, T, V, RStride>
see ColRef::subrows
Sourcepub fn as_row_shape_mut<V: Shape>(self, nrows: V) -> ColMut<'a, T, V, RStride>
pub fn as_row_shape_mut<V: Shape>(self, nrows: V) -> ColMut<'a, T, V, RStride>
Sourcepub fn as_dyn_rows_mut(self) -> ColMut<'a, T, usize, RStride>
pub fn as_dyn_rows_mut(self) -> ColMut<'a, T, usize, RStride>
Sourcepub fn as_dyn_stride_mut(self) -> ColMut<'a, T, Rows, isize>
pub fn as_dyn_stride_mut(self) -> ColMut<'a, T, Rows, isize>
Sourcepub fn iter_mut(
self,
) -> impl 'a + ExactSizeIterator + DoubleEndedIterator<Item = &'a mut T>where
Rows: 'a,
pub fn iter_mut(
self,
) -> impl 'a + ExactSizeIterator + DoubleEndedIterator<Item = &'a mut T>where
Rows: 'a,
see ColRef::iter
Sourcepub fn par_iter_mut(self) -> impl 'a + IndexedParallelIterator<Item = &'a mut T>where
T: Send,
Rows: 'a,
pub fn par_iter_mut(self) -> impl 'a + IndexedParallelIterator<Item = &'a mut T>where
T: Send,
Rows: 'a,
see ColRef::par_iter
Sourcepub fn par_partition_mut(
self,
count: usize,
) -> impl 'a + IndexedParallelIterator<Item = ColMut<'a, T, usize, RStride>>where
T: Send,
Rows: 'a,
pub fn par_partition_mut(
self,
count: usize,
) -> impl 'a + IndexedParallelIterator<Item = ColMut<'a, T, usize, RStride>>where
T: Send,
Rows: 'a,
Sourcepub fn as_diagonal_mut(self) -> DiagMut<'a, T, Rows, RStride>
pub fn as_diagonal_mut(self) -> DiagMut<'a, T, Rows, RStride>
Source§impl<'a, T, Rows: Shape> ColMut<'a, T, Rows, ContiguousFwd>
impl<'a, T, Rows: Shape> ColMut<'a, T, Rows, ContiguousFwd>
Sourcepub fn as_slice_mut(self) -> &'a mut [T]
pub fn as_slice_mut(self) -> &'a mut [T]
returns a reference over the elements as a slice
Source§impl<'a, 'ROWS, T> ColMut<'a, T, Dim<'ROWS>, ContiguousFwd>
impl<'a, 'ROWS, T> ColMut<'a, T, Dim<'ROWS>, ContiguousFwd>
Sourcepub fn as_array_mut(self) -> &'a mut Array<'ROWS, T>
pub fn as_array_mut(self) -> &'a mut Array<'ROWS, T>
returns a reference over the elements as a lifetime-bound slice
Trait Implementations§
Source§impl<'a, 'N, T, Rs: Stride> ColIndex<<Dim<'N> as ShapeIdx>::Idx<usize>> for ColMut<'a, T, Dim<'N>, Rs>
impl<'a, 'N, T, Rs: Stride> ColIndex<<Dim<'N> as ShapeIdx>::Idx<usize>> for ColMut<'a, T, Dim<'N>, Rs>
Source§impl<'a, T, Rs: Stride> ColIndex<<usize as ShapeIdx>::Idx<usize>> for ColMut<'a, T, usize, Rs>
impl<'a, T, Rs: Stride> ColIndex<<usize as ShapeIdx>::Idx<usize>> for ColMut<'a, T, usize, Rs>
Source§impl<'a, R: Shape, T, Rs: Stride, RowRange: IntoRange<IdxInc<R>, Len<R>: 'a>> ColIndex<RowRange> for ColMut<'a, T, R, Rs>
impl<'a, R: Shape, T, Rs: Stride, RowRange: IntoRange<IdxInc<R>, Len<R>: 'a>> ColIndex<RowRange> for ColMut<'a, T, R, Rs>
Source§impl<'b, T, Len: Shape, Strd: Stride> MatIndex for ColMut<'b, T, Len, Strd>
impl<'b, T, Len: Shape, Strd: Stride> MatIndex for ColMut<'b, T, Len, Strd>
Source§type LayoutTransform = VecLayoutTransform
type LayoutTransform = VecLayoutTransform
type Slice = SliceMut<'b, T>
Source§unsafe fn get_slice_unchecked<'a>(
this: &'a mut Self,
idx: Self::Index,
n_elems: usize,
) -> <Self::Slice as SliceFamily<'a, Self::Item>>::Slice
unsafe fn get_slice_unchecked<'a>( this: &'a mut Self, idx: Self::Index, n_elems: usize, ) -> <Self::Slice as SliceFamily<'a, Self::Item>>::Slice
n_elems