Struct rlifesrc_lib::rules::life::NbhdDesc
source · pub struct NbhdDesc(u16);
Expand description
The neighborhood descriptor.
It is a 12-bit integer of the form 0b_abcd_efgh_ij_kl
,
where:
0b_abcd
is the number of dead cells in the neighborhood.0b_efgh
is the number of living cells in the neighborhood.0b_ij
is the state of the successor.0b_kl
is the state of the cell itself.
For 0b_ij
and 0b_kl
:
0b_10
means dead,0b_01
means alive,0b_00
means unknown.
Tuple Fields§
§0: u16
Trait Implementations§
source§impl PartialEq for NbhdDesc
impl PartialEq for NbhdDesc
impl Copy for NbhdDesc
impl Eq for NbhdDesc
impl StructuralEq for NbhdDesc
impl StructuralPartialEq for NbhdDesc
Auto Trait Implementations§
impl RefUnwindSafe for NbhdDesc
impl Send for NbhdDesc
impl Sync for NbhdDesc
impl Unpin for NbhdDesc
impl UnwindSafe for NbhdDesc
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