[][src]Struct gridsim::neumann::NeumannNeighbors

pub struct NeumannNeighbors<T> {
    pub right: T,
    pub up_right: T,
    pub up: T,
    pub up_left: T,
    pub left: T,
    pub down_left: T,
    pub down: T,
    pub down_right: T,
}

Fields

right: Tup_right: Tup: Tup_left: Tleft: Tdown_left: Tdown: Tdown_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)>>

impl<'a, C, S> GetNeighbors<'a, usize, NeumannNeighbors<&'a C>> for SquareGrid<'a, S> where
    S: Sim<'a, Cell = C>, 
[src]

impl<'a, S, M> TakeMoveNeighbors<usize, NeumannNeighbors<M>> for SquareGrid<'a, S> where
    S: Sim<'a, Move = M, MoveNeighbors = NeumannNeighbors<M>>, 
[src]

impl<T: Copy> Copy for NeumannNeighbors<T>[src]

impl<T: Default> Default for NeumannNeighbors<T>[src]

impl<'a, T> From<NeumannNeighbors<&'a T>> for NeumannNeighbors<T> where
    T: Clone
[src]

impl<T: Clone> Clone for 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]

type Output = T

The returned type after indexing.

impl<T> IndexMut<NeumannDirection> for NeumannNeighbors<T>[src]

impl<T: Debug> Debug for NeumannNeighbors<T>[src]

impl<T> FromIterator<T> for NeumannNeighbors<T>[src]

Auto Trait Implementations

impl<T> Send for NeumannNeighbors<T> where
    T: Send

impl<T> Unpin for NeumannNeighbors<T> where
    T: Unpin

impl<T> Sync for NeumannNeighbors<T> where
    T: Sync

impl<T> UnwindSafe for NeumannNeighbors<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for NeumannNeighbors<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]