pub struct Grid2dNeighborSample<T> { /* private fields */ }

Implementations§

source§

impl<T> Grid2dNeighborSample<T>where T: Clone,

source

pub fn cols(&self) -> usize

source

pub fn rows(&self) -> usize

source

pub fn size(&self) -> (usize, usize)

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn cells(&self) -> &[T]

source

pub fn cell(&self, col: usize, row: usize) -> Option<&T>

source

pub fn cell_mut(&mut self, col: usize, row: usize) -> Option<&mut T>

source

pub fn get(&self, col: usize, row: usize) -> Option<T>

source

pub fn set(&mut self, col: usize, row: usize, value: T)

source

pub fn map<F, R>(&self, f: F) -> Grid2dNeighborSample<R>where F: FnMut(usize, usize, &T) -> R, R: Default + Copy,

source

pub fn with<F>(&mut self, f: F)where F: FnMut(usize, usize, &T) -> T,

source

pub fn iter(&self) -> impl DoubleEndedIterator

source

pub fn iter_mut(&mut self) -> impl DoubleEndedIterator

Trait Implementations§

source§

impl<T> Debug for Grid2dNeighborSample<T>where T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<I, T> From<(usize, I)> for Grid2dNeighborSample<T>where I: Iterator<Item = T>, T: Default + Copy,

source§

fn from(_: (usize, I)) -> Grid2dNeighborSample<T>

Converts to this type from the input type.
source§

impl<T> Index<[usize; 2]> for Grid2dNeighborSample<T>where T: Clone + Send + Sync,

§

type Output = T

The returned type after indexing.
source§

fn index(&self, _: [usize; 2]) -> &T

Performs the indexing (container[index]) operation. Read more
source§

impl<T> Index<(usize, usize)> for Grid2dNeighborSample<T>where T: Clone + Send + Sync,

§

type Output = T

The returned type after indexing.
source§

fn index(&self, _: (usize, usize)) -> &T

Performs the indexing (container[index]) operation. Read more
source§

impl<T> IndexMut<[usize; 2]> for Grid2dNeighborSample<T>where T: Clone + Send + Sync,

source§

fn index_mut(&mut self, _: [usize; 2]) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<T> IndexMut<(usize, usize)> for Grid2dNeighborSample<T>where T: Clone + Send + Sync,

source§

fn index_mut(&mut self, _: (usize, usize)) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Grid2dNeighborSample<T>where T: RefUnwindSafe,

§

impl<T> Send for Grid2dNeighborSample<T>where T: Send,

§

impl<T> Sync for Grid2dNeighborSample<T>where T: Sync,

§

impl<T> Unpin for Grid2dNeighborSample<T>where T: Unpin,

§

impl<T> UnwindSafe for Grid2dNeighborSample<T>where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V