pub struct Segmentation<const D: usize, T> { /* private fields */ }Implementations§
Source§impl<const D: usize, T> Segmentation<D, T>
impl<const D: usize, T> Segmentation<D, T>
pub fn new( grid: Grid<D, T>, scale: Coordinate<D>, translate: Coordinate<D>, ) -> Self
pub fn grid(&self) -> &Grid<D, T>
pub fn into_parts(self) -> (Grid<D, T>, Coordinate<D>, Coordinate<D>)
pub fn scale(&self) -> &Coordinate<D>
pub fn translate(&self) -> &Coordinate<D>
Methods from Deref<Target = Grid<D, T>>§
pub fn data(&self) -> &[T]
pub fn flat(&self, index: [usize; D]) -> usize
pub fn logical_iter<'a>( &'a self, ) -> impl Iterator<Item = ([usize; D], &'a T)> + 'a
pub fn nel(&self) -> &[usize; D]
pub fn is_col_major(&self) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn data_col_major(&self) -> Cow<'_, [T]>
pub fn extract(&self, ranges: [Range<usize>; D]) -> Self
pub fn diff(&self, other: &Self) -> Grid<D, u8>
Trait Implementations§
Source§impl<const D: usize, T> Deref for Segmentation<D, T>
impl<const D: usize, T> Deref for Segmentation<D, T>
Source§impl<const D: usize, T> DerefMut for Segmentation<D, T>
impl<const D: usize, T> DerefMut for Segmentation<D, T>
Auto Trait Implementations§
impl<const D: usize, T> Freeze for Segmentation<D, T>
impl<const D: usize, T> RefUnwindSafe for Segmentation<D, T>where
T: RefUnwindSafe,
impl<const D: usize, T> Send for Segmentation<D, T>where
T: Send,
impl<const D: usize, T> Sync for Segmentation<D, T>where
T: Sync,
impl<const D: usize, T> Unpin for Segmentation<D, T>where
T: Unpin,
impl<const D: usize, T> UnsafeUnpin for Segmentation<D, T>
impl<const D: usize, T> UnwindSafe for Segmentation<D, T>where
T: 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