pub struct CellularAutomaton { /* private fields */ }Expand description
Клеточный автомат
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
Создать новый 1D клеточный автомат
Sourcepub fn game_of_life(name: &str, width: usize, height: usize) -> Self
pub fn game_of_life(name: &str, width: usize, height: usize) -> Self
Создать новый Game of Life
Sourcepub fn with_output_mode(self, mode: OutputMode) -> Self
pub fn with_output_mode(self, mode: OutputMode) -> Self
Установить режим вывода
Sourcepub fn with_range(self, range: Range) -> Self
pub fn with_range(self, range: Range) -> Self
Установить диапазон
Trait Implementations§
Source§impl Automaton for CellularAutomaton
impl Automaton for CellularAutomaton
Source§type State = CellularState
type State = CellularState
Тип состояния
Source§fn step(
&self,
_time: Time,
_action: &Self::Action,
state: &Self::State,
) -> (Self::State, Option<f64>)
fn step( &self, _time: Time, _action: &Self::Action, state: &Self::State, ) -> (Self::State, Option<f64>)
Выполнить один шаг автомата Read more
Source§fn initial_state(&self) -> Self::State
fn initial_state(&self) -> Self::State
Начальное состояние
Source§fn extract_value(&self, state: &Self::State) -> f64
fn extract_value(&self, state: &Self::State) -> f64
Извлечь значение из состояния
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 · 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