Struct rlifesrc_lib::rules::ntlife::NtLife
source · pub struct NtLife {
b0: bool,
s8: bool,
symmetry: Symmetry,
impl_table: Vec<ImplFlags>,
}
Expand description
Non-totalistic Life-like rules.
This includes any rule that can be converted to a non-totalistic Life-like rule: isotropic non-totalistic rules, non-isotropic rules, hexagonal rules, rules with von Neumann neighborhoods, etc.
Fields§
§b0: bool
Whether the rule contains B0
.
s8: bool
Whether the rule contains S8
.
symmetry: Symmetry
The symmetry of the rule.
impl_table: Vec<ImplFlags>
An array of actions for all neighborhood descriptors.
Implementations§
source§impl NtLife
impl NtLife
sourcefn init_symmetry(self, b: &[u8], s: &[u8]) -> Self
fn init_symmetry(self, b: &[u8], s: &[u8]) -> Self
Deduces the symmetry of the rule
sourcefn init_trans(self, b: &[u8], s: &[u8]) -> Self
fn init_trans(self, b: &[u8], s: &[u8]) -> Self
Deduces the implication for the successor.
sourcefn init_conflict(self) -> Self
fn init_conflict(self) -> Self
Deduces the conflicts.
sourcefn init_impl_nbhd(self) -> Self
fn init_impl_nbhd(self) -> Self
Deduces the implication for the neighbors.
Trait Implementations§
source§impl ParseNtLife for NtLife
impl ParseNtLife for NtLife
A parser for the rule.
source§impl Rule for NtLife
impl Rule for NtLife
source§fn new_desc(state: State, succ_state: State) -> Self::Desc
fn new_desc(state: State, succ_state: State) -> Self::Desc
Generates a neighborhood descriptor which says that all neighboring
cells have states
state
, and the successor has state succ_state
.source§fn update_desc(cell: &LifeCell<Self>, state: State, _new: bool)
fn update_desc(cell: &LifeCell<Self>, state: State, _new: bool)
Updates the neighborhood descriptors of all neighbors and the predecessor
when the state of one cell is changed. Read more
source§fn consistify<A: Algorithm<Self>>(
world: &mut World<Self, A>,
cell: CellRef<Self>
) -> Result<(), A::ConflReason>
fn consistify<A: Algorithm<Self>>( world: &mut World<Self, A>, cell: CellRef<Self> ) -> Result<(), A::ConflReason>
Consistifies a cell. Read more
impl Sealed for NtLife
Auto Trait Implementations§
impl RefUnwindSafe for NtLife
impl Send for NtLife
impl Sync for NtLife
impl Unpin for NtLife
impl UnwindSafe for NtLife
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