pub struct CellularAutomaton { /* private fields */ }Expand description
Cellular automaton
Implementations§
Source§impl CellularAutomaton
impl CellularAutomaton
Sourcepub fn one_dimensional(name: &str, rule: u8, size: usize) -> Self
pub fn one_dimensional(name: &str, rule: u8, size: usize) -> Self
Create a new 1D cellular automaton
Sourcepub fn game_of_life(name: &str, width: usize, height: usize) -> Self
pub fn game_of_life(name: &str, width: usize, height: usize) -> Self
Create a new Game of Life
Sourcepub fn with_output_mode(self, mode: OutputMode) -> Self
pub fn with_output_mode(self, mode: OutputMode) -> Self
Set the output mode
Sourcepub fn with_range(self, range: Range) -> Self
pub fn with_range(self, range: Range) -> Self
Set the range
Trait Implementations§
Source§impl Automaton for CellularAutomaton
impl Automaton for CellularAutomaton
Source§type Internal = (Vec<u8>, usize)
type Internal = (Vec<u8>, usize)
The automaton’s internal state, carried across step invocations.
Source§fn step(
&self,
internal: &mut Self::Internal,
_current: &ParamValue,
_time: Time,
_action: &Self::Action,
) -> ParamValue
fn step( &self, internal: &mut Self::Internal, _current: &ParamValue, _time: Time, _action: &Self::Action, ) -> ParamValue
Advances the automaton by one step, producing a new output value. Read more
Source§fn initial_internal(&self) -> Self::Internal
fn initial_internal(&self) -> Self::Internal
Returns the automaton’s initial internal state (at time zero).
Source§impl Clone for CellularAutomaton
impl Clone for CellularAutomaton
Source§fn clone(&self) -> CellularAutomaton
fn clone(&self) -> CellularAutomaton
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CellularAutomaton
impl RefUnwindSafe for CellularAutomaton
impl Send for CellularAutomaton
impl Sync for CellularAutomaton
impl Unpin for CellularAutomaton
impl UnsafeUnpin for CellularAutomaton
impl UnwindSafe for CellularAutomaton
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