pub struct StaticCellularAutomata<'a> { /* private fields */ }
Expand description
StaticCellularAutomata is an implementation of a static cellular automata (which remains the same)
Implementations
sourceimpl<'a> StaticCellularAutomata<'a>
impl<'a> StaticCellularAutomata<'a>
pub fn neighbor_parser(
data: &GridDataType<UsizeWrapper>,
address: usize
) -> NeighborType<'_, UsizeWrapper>
pub fn transition(
data: &mut UsizeWrapper,
neighbor: &NeighborType<'_, UsizeWrapper>
)
pub fn run(
exec: &ExecFunc<UsizeWrapper>,
transition: &TransitionFunc<UsizeWrapper>,
neighbor: &NeighborFuncParser<UsizeWrapper>,
low: usize,
high: usize,
write: &mut [UsizeWrapper],
read: &GridDataType<UsizeWrapper>
)
Trait Implementations
sourceimpl<'a> CellularAutomata<'a, UsizeWrapper> for StaticCellularAutomata<'a>
impl<'a> CellularAutomata<'a, UsizeWrapper> for StaticCellularAutomata<'a>
sourcefn new() -> StaticCellularAutomata<'a>
fn new() -> StaticCellularAutomata<'a>
Function new creates a new, empty cellular automata
sourcefn input_handler(
grid: &mut Grid<'_, UsizeWrapper>,
reader: &Reader,
printer: &Printer
)
fn input_handler(
grid: &mut Grid<'_, UsizeWrapper>,
reader: &Reader,
printer: &Printer
)
Function input_handler takes the grid and a reader and modifies the grid according to what it reads. The printer argument is there just so the automata can prompt the user (if needed)
sourcefn output_handler(grid: &Grid<'_, UsizeWrapper>, printer: &Printer)
fn output_handler(grid: &Grid<'_, UsizeWrapper>, printer: &Printer)
Function output_handler takes a grid and a printer and prints out something, according to the data of the grid.
Auto Trait Implementations
impl<'a> RefUnwindSafe for StaticCellularAutomata<'a>
impl<'a> Send for StaticCellularAutomata<'a>
impl<'a> Sync for StaticCellularAutomata<'a>
impl<'a> Unpin for StaticCellularAutomata<'a>
impl<'a> UnwindSafe for StaticCellularAutomata<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more