[−][src]Struct hashlife::Node
A Node
represents the top of a tree (or subtree) in the Hashlife data
structure. The state of Hashlife is stored in a Node
and its children
forming a state tree.
Level
Each Node
has a level
where 0
is a leaf and
any positive number is a branch. Given a level 'x', it can be derived
that the node is x
nodes away from the leaf level. All leaves are on
the same level.
Population
Each node has a population
informing how many living Automata::Alive
leaves this subtree constains. If the Node
is a leaf, then the
popilation can only be 1 or 0 respectively representing
Automata::Alive
or Automata::Dead
.
Children
The Node
in a hashlife algorithm is known as a QuadTree where the node
points to four child nodes. The children field is an optional and is
None
only when it is a leaf node at level=0
.
Trait Implementations
impl Debug for Node
[src]
impl Eq for Node
[src]
impl Hash for Node
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Node> for Node
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Node
impl !Send for Node
impl !Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,