[][src]Struct smeagol::node::Store

pub struct Store { /* fields omitted */ }

A struct to store nodes and node evolution results.

Methods

impl Store[src]

pub fn new() -> Self[src]

Creates a new empty store.

Examples

let store = smeagol::node::Store::new();

pub fn node(&self, id: NodeId) -> Node[src]

Returns the node corresponding to the given node ID.

pub fn create_leaf(&mut self, grid: u16x16) -> NodeId[src]

Creates a leaf node corresponding to the given 16 by 16 grid.

pub fn create_interior(&mut self, template: NodeTemplate) -> NodeId[src]

Creates an interior node from the given node template.

pub fn create_empty(&mut self, level: Level) -> NodeId[src]

Creates an empty node with the given level.

impl Store[src]

pub fn step_log_2(&self) -> u8[src]

Returns the current step size log 2.

pub fn set_step_log_2(&mut self, step_log_2: u8)[src]

Sets the step size to be 2^step_log_2.

This clears previously calculated steps.

pub fn get_step(&self, id: NodeId) -> Option<NodeId>[src]

Gets the step of the given node, if it has been previously calculated.

pub fn add_step(&mut self, id: NodeId, step: NodeId)[src]

Sets the step of the given node.

pub fn get_jump(&self, id: NodeId) -> Option<NodeId>[src]

Gets the jump of the given node, if it has been previously calculated.

pub fn add_jump(&mut self, id: NodeId, jump: NodeId)[src]

Sets the jump of the given node.

Trait Implementations

impl Default for Store[src]

impl Clone for Store[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Store[src]

Auto Trait Implementations

impl Send for Store

impl Sync for Store

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> FromCast for T[src]

impl<T, U> Cast for T where
    U: FromCast<T>, 
[src]