Struct rlifesrc_lib::rules::Life
source · pub struct Life {
b0: bool,
s8: bool,
impl_table: [ImplFlags; 4096],
}
Expand description
Totalistic Life-like rules.
Fields§
§b0: bool
Whether the rule contains B0
.
s8: bool
Whether the rule contains S8
.
impl_table: [ImplFlags; 4096]
An array of actions for all neighborhood descriptors.
Implementations§
source§impl Life
impl Life
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 Rule for Life
impl Rule for Life
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 Life
Auto Trait Implementations§
impl RefUnwindSafe for Life
impl Send for Life
impl Sync for Life
impl Unpin for Life
impl UnwindSafe for Life
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