pub struct CubeSphereGrid<T, const S: usize> { /* private fields */ }
Expand description
Trait Implementations§
Source§impl<T: Clone, const S: usize> Clone for CubeSphereGrid<T, S>
impl<T: Clone, const S: usize> Clone for CubeSphereGrid<T, S>
Source§fn clone(&self) -> CubeSphereGrid<T, S>
fn clone(&self) -> CubeSphereGrid<T, S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Default, const S: usize> Default for CubeSphereGrid<T, S>
impl<T: Default, const S: usize> Default for CubeSphereGrid<T, S>
Source§fn default() -> CubeSphereGrid<T, S>
fn default() -> CubeSphereGrid<T, S>
Returns the “default value” for a type. Read more
Source§impl<T, const S: usize> Index<CubeSpherePoint<S>> for CubeSphereGrid<T, S>
impl<T, const S: usize> Index<CubeSpherePoint<S>> for CubeSphereGrid<T, S>
Source§impl<T, const S: usize> IndexMut<CubeSpherePoint<S>> for CubeSphereGrid<T, S>
impl<T, const S: usize> IndexMut<CubeSpherePoint<S>> for CubeSphereGrid<T, S>
Source§impl<T, const S: usize> IntoIterator for CubeSphereGrid<T, S>
impl<T, const S: usize> IntoIterator for CubeSphereGrid<T, S>
Source§impl<T: Debug, const S: usize> SurfaceGrid<T> for CubeSphereGrid<T, S>
impl<T: Debug, const S: usize> SurfaceGrid<T> for CubeSphereGrid<T, S>
Source§type Point = CubeSpherePoint<S>
type Point = CubeSpherePoint<S>
The type of a point on this grid.
Source§fn from_fn<F: FnMut(&Self::Point) -> T>(f: F) -> Self
fn from_fn<F: FnMut(&Self::Point) -> T>(f: F) -> Self
Creates a new surface grid by calling the specified function for each point in the grid. Read more
Source§fn from_fn_par<F: Fn(&Self::Point) -> T + Send + Sync>(f: F) -> Self
fn from_fn_par<F: Fn(&Self::Point) -> T + Send + Sync>(f: F) -> Self
Creates a new surface grid by calling the specified function in parallel for each point in
the grid. Read more
Source§fn set_from_fn<F: FnMut(&Self::Point) -> T>(&mut self, f: F)
fn set_from_fn<F: FnMut(&Self::Point) -> T>(&mut self, f: F)
Updates this surface grid by calling the specified function for each point in the grid. Read more
Source§fn set_from_fn_par<F: Fn(&Self::Point) -> T + Send + Sync>(&mut self, f: F)
fn set_from_fn_par<F: Fn(&Self::Point) -> T + Send + Sync>(&mut self, f: F)
Updates this surface grid by calling the specified function for each point in the grid in
parallel. Read more
Source§fn iter<'a>(&'a self) -> impl Iterator<Item = (Self::Point, &'a T)>where
T: 'a,
fn iter<'a>(&'a self) -> impl Iterator<Item = (Self::Point, &'a T)>where
T: 'a,
Iterates over the points in this grid and their values.
Source§fn par_iter<'a>(&'a self) -> impl ParallelIterator<Item = (Self::Point, &'a T)>
fn par_iter<'a>(&'a self) -> impl ParallelIterator<Item = (Self::Point, &'a T)>
Iterates over the points in this grid and their values in parallel.
Source§fn par_points(&self) -> impl ParallelIterator<Item = Self::Point>
fn par_points(&self) -> impl ParallelIterator<Item = Self::Point>
Iterates over the points in this grid in parallel.
Source§fn for_each(&mut self, f: impl FnMut(&mut T))
fn for_each(&mut self, f: impl FnMut(&mut T))
Calls a function for each element on this grid. Read more
Source§fn for_each_with_position(&mut self, f: impl FnMut(&Self::Point, &mut T))
fn for_each_with_position(&mut self, f: impl FnMut(&Self::Point, &mut T))
Calls a function for each element on this grid with the position. Read more
Source§fn par_for_each(&mut self, f: impl Fn(&mut T) + Sync)
fn par_for_each(&mut self, f: impl Fn(&mut T) + Sync)
Calls a function for each element on this grid in parallel. Read more
Source§fn par_for_each_with_position(
&mut self,
f: impl Fn(&Self::Point, &mut T) + Sync,
)
fn par_for_each_with_position( &mut self, f: impl Fn(&Self::Point, &mut T) + Sync, )
Calls a function for each element on this grid with the position in parallel. Read more
Source§fn map_neighbours<F: FnMut(&T, &T, &T, &T, &T) -> T>(&self, f: F) -> Selfwhere
Self: Sized,
fn map_neighbours<F: FnMut(&T, &T, &T, &T, &T) -> T>(&self, f: F) -> Selfwhere
Self: Sized,
Applies a function to each cell and its direct neighbours. Read more
Source§fn map_neighbours_diagonals<F: FnMut(&T, &T, &T, &T, &T, &T, &T, &T, &T) -> T>(
&self,
f: F,
) -> Selfwhere
Self: Sized,
fn map_neighbours_diagonals<F: FnMut(&T, &T, &T, &T, &T, &T, &T, &T, &T) -> T>(
&self,
f: F,
) -> Selfwhere
Self: Sized,
Applies a function to each cell and its direct neighbours including diagonals. Read more
Source§fn map_neighbours_par<F: Fn(&T, &T, &T, &T, &T) -> T + Send + Sync>(
&self,
f: F,
) -> Self
fn map_neighbours_par<F: Fn(&T, &T, &T, &T, &T) -> T + Send + Sync>( &self, f: F, ) -> Self
Applies a function in parallel to each cell and its direct neighbours. Read more
Source§fn map_neighbours_diagonals_par<F: Fn(&T, &T, &T, &T, &T, &T, &T, &T, &T) -> T + Send + Sync>(
&self,
f: F,
) -> Self
fn map_neighbours_diagonals_par<F: Fn(&T, &T, &T, &T, &T, &T, &T, &T, &T) -> T + Send + Sync>( &self, f: F, ) -> Self
Applies a function in parallel to each cell and its direct neighbours including diagonals. Read more
Source§fn map_neighbours_with_position<F: FnMut(&T, &Self::Point, &T, &T, &T, &T) -> T>(
&self,
f: F,
) -> Selfwhere
Self: Sized,
fn map_neighbours_with_position<F: FnMut(&T, &Self::Point, &T, &T, &T, &T) -> T>(
&self,
f: F,
) -> Selfwhere
Self: Sized,
Applies a function to each cell and its direct neighbours providing the current point. Read more
Source§fn map_neighbours_diagonals_with_position<F: FnMut(&Self::Point, &T, &T, &T, &T, &T, &T, &T, &T, &T) -> T>(
&self,
f: F,
) -> Selfwhere
Self: Sized,
fn map_neighbours_diagonals_with_position<F: FnMut(&Self::Point, &T, &T, &T, &T, &T, &T, &T, &T, &T) -> T>(
&self,
f: F,
) -> Selfwhere
Self: Sized,
Applies a function to each cell and its direct neighbours including diagonals providing the
current point. Read more
Source§fn map_neighbours_par_with_position<F: Fn(&T, &Self::Point, &T, &T, &T, &T) -> T + Send + Sync>(
&self,
f: F,
) -> Self
fn map_neighbours_par_with_position<F: Fn(&T, &Self::Point, &T, &T, &T, &T) -> T + Send + Sync>( &self, f: F, ) -> Self
Applies a function in parallel to each cell and its direct neighbours providing the current
point. Read more
Source§fn map_neighbours_diagonals_par_with_position<F: Fn(&Self::Point, &T, &T, &T, &T, &T, &T, &T, &T, &T) -> T + Send + Sync>(
&self,
f: F,
) -> Self
fn map_neighbours_diagonals_par_with_position<F: Fn(&Self::Point, &T, &T, &T, &T, &T, &T, &T, &T, &T) -> T + Send + Sync>( &self, f: F, ) -> Self
Applies a function in parallel to each cell and its direct neighbours including diagonals
providing the current point. Read more
Source§fn set_from_neighbours<U, G: SurfaceGrid<U, Point = Self::Point>, F: FnMut(&U, &U, &U, &U, &U) -> T>(
&mut self,
source: &G,
f: F,
)
fn set_from_neighbours<U, G: SurfaceGrid<U, Point = Self::Point>, F: FnMut(&U, &U, &U, &U, &U) -> T>( &mut self, source: &G, f: F, )
Applies a function to each cell and its direct neighbours. Read more
Source§fn set_from_neighbours_diagonals<U, G: SurfaceGrid<U, Point = Self::Point>, F: FnMut(&U, &U, &U, &U, &U, &U, &U, &U, &U) -> T>(
&mut self,
source: &G,
f: F,
)
fn set_from_neighbours_diagonals<U, G: SurfaceGrid<U, Point = Self::Point>, F: FnMut(&U, &U, &U, &U, &U, &U, &U, &U, &U) -> T>( &mut self, source: &G, f: F, )
Applies a function to each cell and its direct neighbours including diagonals. Read more
Source§fn set_from_neighbours_par<U, G: SurfaceGrid<U, Point = Self::Point> + Sync, F: Fn(&U, &U, &U, &U, &U) -> T + Send + Sync>(
&mut self,
source: &G,
f: F,
)
fn set_from_neighbours_par<U, G: SurfaceGrid<U, Point = Self::Point> + Sync, F: Fn(&U, &U, &U, &U, &U) -> T + Send + Sync>( &mut self, source: &G, f: F, )
Applies a function to each cell and its direct neighbours in parallel. Read more
Source§fn set_from_neighbours_diagonals_par<U, G: SurfaceGrid<U, Point = Self::Point> + Sync, F: Fn(&U, &U, &U, &U, &U, &U, &U, &U, &U) -> T + Send + Sync>(
&mut self,
source: &G,
f: F,
)
fn set_from_neighbours_diagonals_par<U, G: SurfaceGrid<U, Point = Self::Point> + Sync, F: Fn(&U, &U, &U, &U, &U, &U, &U, &U, &U) -> T + Send + Sync>( &mut self, source: &G, f: F, )
Applies a function to each cell and its direct neighbours including diagonals in parallel. Read more
Source§fn set_from_neighbours_with_position<U, G: SurfaceGrid<U, Point = Self::Point>, F: FnMut(&U, &Self::Point, &U, &U, &U, &U) -> T>(
&mut self,
source: &G,
f: F,
)
fn set_from_neighbours_with_position<U, G: SurfaceGrid<U, Point = Self::Point>, F: FnMut(&U, &Self::Point, &U, &U, &U, &U) -> T>( &mut self, source: &G, f: F, )
Applies a function to each cell and its direct neighbours providing the position. Read more
Source§fn set_from_neighbours_diagonals_with_position<U, G: SurfaceGrid<U, Point = Self::Point>, F: FnMut(&Self::Point, &U, &U, &U, &U, &U, &U, &U, &U, &U) -> T>(
&mut self,
source: &G,
f: F,
)
fn set_from_neighbours_diagonals_with_position<U, G: SurfaceGrid<U, Point = Self::Point>, F: FnMut(&Self::Point, &U, &U, &U, &U, &U, &U, &U, &U, &U) -> T>( &mut self, source: &G, f: F, )
Applies a function to each cell and its direct neighbours including diagonals. Read more
Source§fn set_from_neighbours_par_with_position<U, G: SurfaceGrid<U, Point = Self::Point> + Sync, F: Fn(&U, &Self::Point, &U, &U, &U, &U) -> T + Send + Sync>(
&mut self,
source: &G,
f: F,
)
fn set_from_neighbours_par_with_position<U, G: SurfaceGrid<U, Point = Self::Point> + Sync, F: Fn(&U, &Self::Point, &U, &U, &U, &U) -> T + Send + Sync>( &mut self, source: &G, f: F, )
Applies a function to each cell and its direct neighbours in parallel. Read more
Source§fn set_from_neighbours_diagonals_par_with_position<U, G: SurfaceGrid<U, Point = Self::Point> + Sync, F: Fn(&Self::Point, &U, &U, &U, &U, &U, &U, &U, &U, &U) -> T + Send + Sync>(
&mut self,
source: &G,
f: F,
)
fn set_from_neighbours_diagonals_par_with_position<U, G: SurfaceGrid<U, Point = Self::Point> + Sync, F: Fn(&Self::Point, &U, &U, &U, &U, &U, &U, &U, &U, &U) -> T + Send + Sync>( &mut self, source: &G, f: F, )
Applies a function to each cell and its direct neighbours including diagonals in parallel. Read more
impl<T: Eq, const S: usize> Eq for CubeSphereGrid<T, S>
impl<T, const S: usize> StructuralPartialEq for CubeSphereGrid<T, S>
Auto Trait Implementations§
impl<T, const S: usize> Freeze for CubeSphereGrid<T, S>
impl<T, const S: usize> RefUnwindSafe for CubeSphereGrid<T, S>where
T: RefUnwindSafe,
impl<T, const S: usize> Send for CubeSphereGrid<T, S>where
T: Send,
impl<T, const S: usize> Sync for CubeSphereGrid<T, S>where
T: Sync,
impl<T, const S: usize> Unpin for CubeSphereGrid<T, S>
impl<T, const S: usize> UnwindSafe for CubeSphereGrid<T, S>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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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