[−][src]Struct gridsim::neumann::NeumannNeighbors
Fields
right: T
up_right: T
up: T
up_left: T
left: T
down_left: T
down: T
down_right: T
Methods
impl<T> NeumannNeighbors<T>
[src]
pub fn as_ref(&self) -> NeumannNeighbors<&T>
[src]
impl NeumannNeighbors<bool>
[src]
pub fn chooser(sigmoids: impl Iterator<Item = f32>) -> Self
[src]
Must provide an input iterator with length of the number of directions for the Direction
impl
which contains sigmoid outputs in the range of (0.0, 1.0). For each direction this will instantiate
a bool that indicates whether that direction was above 0.5.
pub fn chooser_slice(sigmoids: &[f32]) -> Self
[src]
Trait Implementations
impl<T> Neighborhood<T> for NeumannNeighbors<T>
[src]
type Direction = NeumannDirection
type Iter = Chain<Chain<Chain<Chain<Chain<Chain<Chain<Once<T>, Once<T>>, Once<T>>, Once<T>>, Once<T>>, Once<T>>, Once<T>>, Once<T>>
type DirIter = Chain<Chain<Chain<Chain<Chain<Chain<Chain<Once<(NeumannDirection, T)>, Once<(NeumannDirection, T)>>, Once<(NeumannDirection, T)>>, Once<(NeumannDirection, T)>>, Once<(NeumannDirection, T)>>, Once<(NeumannDirection, T)>>, Once<(NeumannDirection, T)>>, Once<(NeumannDirection, T)>>
fn new<F: FnMut(NeumannDirection) -> T>(f: F) -> NeumannNeighbors<T>
[src]
fn iter(self) -> Self::Iter
[src]
fn dir_iter(self) -> Self::DirIter
[src]
impl<'a, C, S> GetNeighbors<'a, usize, NeumannNeighbors<&'a C>> for SquareGrid<'a, S> where
S: Sim<'a, Cell = C>,
[src]
S: Sim<'a, Cell = C>,
fn get_neighbors(&'a self, ix: usize) -> NeumannNeighbors<&'a C>
[src]
impl<'a, S, M> TakeMoveNeighbors<usize, NeumannNeighbors<M>> for SquareGrid<'a, S> where
S: Sim<'a, Move = M, MoveNeighbors = NeumannNeighbors<M>>,
[src]
S: Sim<'a, Move = M, MoveNeighbors = NeumannNeighbors<M>>,
unsafe fn take_move_neighbors(&self, ix: usize) -> NeumannNeighbors<M>
[src]
impl<T: Copy> Copy for NeumannNeighbors<T>
[src]
impl<T: Default> Default for NeumannNeighbors<T>
[src]
fn default() -> NeumannNeighbors<T>
[src]
impl<'a, T> From<NeumannNeighbors<&'a T>> for NeumannNeighbors<T> where
T: Clone,
[src]
T: Clone,
fn from(f: NeumannNeighbors<&'a T>) -> Self
[src]
impl<T: Clone> Clone for NeumannNeighbors<T>
[src]
fn clone(&self) -> NeumannNeighbors<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T> Index<NeumannDirection> for NeumannNeighbors<T>
[src]
impl<T> IndexMut<NeumannDirection> for NeumannNeighbors<T>
[src]
fn index_mut(&mut self, ix: NeumannDirection) -> &mut T
[src]
impl<T: Debug> Debug for NeumannNeighbors<T>
[src]
impl<T> FromIterator<T> for NeumannNeighbors<T>
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = T>,
[src]
I: IntoIterator<Item = T>,
Auto Trait Implementations
impl<T> Send for NeumannNeighbors<T> where
T: Send,
T: Send,
impl<T> Unpin for NeumannNeighbors<T> where
T: Unpin,
T: Unpin,
impl<T> Sync for NeumannNeighbors<T> where
T: Sync,
T: Sync,
impl<T> UnwindSafe for NeumannNeighbors<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for NeumannNeighbors<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,