pub struct ArrayViewMut3<'a, T> { /* private fields */ }Expand description
Mutable 3D array view.
Implementations§
Source§impl<'a, T> ArrayViewMut3<'a, T>
impl<'a, T> ArrayViewMut3<'a, T>
Sourcepub fn new(
data: &'a mut [T],
shape: [usize; 3],
strides: [isize; 3],
offset: isize,
) -> Result<Self>
pub fn new( data: &'a mut [T], shape: [usize; 3], strides: [isize; 3], offset: isize, ) -> Result<Self>
Create a checked mutable view.
Sourcepub fn as_view(&self) -> ArrayView3<'_, T>
pub fn as_view(&self) -> ArrayView3<'_, T>
Immutable view over the same region.
Sourcepub fn get_mut(&mut self, i: usize, j: usize, k: usize) -> Option<&mut T>
pub fn get_mut(&mut self, i: usize, j: usize, k: usize) -> Option<&mut T>
Get a mutable element reference.
Sourcepub fn matrix_at_mut(
&mut self,
axis: usize,
index: usize,
) -> Result<ArrayViewMut2<'_, T>>
pub fn matrix_at_mut( &mut self, axis: usize, index: usize, ) -> Result<ArrayViewMut2<'_, T>>
Extract a mutable 2D matrix view by fixing one axis.
Sourcepub fn for_each_matrix_mut(
&mut self,
axis: usize,
f: impl FnMut(usize, ArrayViewMut2<'_, T>) -> Result<()>,
) -> Result<()>
pub fn for_each_matrix_mut( &mut self, axis: usize, f: impl FnMut(usize, ArrayViewMut2<'_, T>) -> Result<()>, ) -> Result<()>
Visit each mutable 2D matrix slice along axis in order.
Trait Implementations§
Source§impl<'a, T: Debug> Debug for ArrayViewMut3<'a, T>
impl<'a, T: Debug> Debug for ArrayViewMut3<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for ArrayViewMut3<'a, T>
impl<'a, T> RefUnwindSafe for ArrayViewMut3<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ArrayViewMut3<'a, T>where
T: Send,
impl<'a, T> Sync for ArrayViewMut3<'a, T>where
T: Sync,
impl<'a, T> Unpin for ArrayViewMut3<'a, T>
impl<'a, T> UnsafeUnpin for ArrayViewMut3<'a, T>
impl<'a, T> !UnwindSafe for ArrayViewMut3<'a, T>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more