[][src]Struct hashlife::Node

pub struct Node { /* fields omitted */ }

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.