[][src]Struct lindenmayer_system::parametric::PDualMapSystem

pub struct PDualMapSystem<A, R> where
    A: DualAlphabet,
    R: ParametricRule,
    <R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
    <R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>, 
{ /* fields omitted */ }

Distinguishes between terminal symbols and non-terminals. Rules are only allowed on non-terminals.

Methods

impl<A, Rule> PDualMapSystem<A, Rule> where
    A: DualAlphabet,
    Rule: ParametricRule,
    <Rule as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
    <Rule as ParametricRule>::OutSym: ParametricSymbol<Sym = A>, 
[src]

pub fn new() -> PDualMapSystem<A, Rule>[src]

pub fn add_rule(&mut self, rule: Rule) -> bool[src]

pub fn with_random_rule<R, F>(&self, rng: &mut R, callback: F) where
    R: Rng,
    F: FnMut(&mut R, Option<&Rule>), 
[src]

pub fn with_random_rule_mut<R, F>(&mut self, rng: &mut R, callback: F) where
    R: Rng,
    F: FnMut(&mut R, Option<&mut Rule>), 
[src]

pub fn each_rule<F>(&self, callback: F) where
    F: FnMut(&Rule), 
[src]

Calls the callback for each rule in the system.

Trait Implementations

impl<A, R> ParametricSystem for PDualMapSystem<A, R> where
    A: DualAlphabet,
    R: ParametricRule,
    <R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
    <R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>, 
[src]

type Rule = R

fn develop_next(
    &self,
    axiom: &Vec<<Self::Rule as ParametricRule>::OutSym>
) -> (Vec<<Self::Rule as ParametricRule>::OutSym>, usize)
[src]

Apply in parallel the first matching rule to each symbol in the string. Returns the total number of rule applications. Read more

fn develop(
    &self,
    axiom: Vec<<Self::Rule as ParametricRule>::OutSym>,
    max_iterations: usize
) -> (Vec<<Self::Rule as ParametricRule>::OutSym>, usize)
[src]

Develop the system starting with axiom up to max_iterations. Return iteration count.

impl<A: Clone, R: Clone> Clone for PDualMapSystem<A, R> where
    A: DualAlphabet,
    R: ParametricRule,
    <R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
    <R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
    A::NonTerminal: Clone
[src]

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

Performs copy-assignment from source. Read more

impl<A: Debug, R: Debug> Debug for PDualMapSystem<A, R> where
    A: DualAlphabet,
    R: ParametricRule,
    <R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
    <R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
    A::NonTerminal: Debug
[src]

Auto Trait Implementations

impl<A, R> Send for PDualMapSystem<A, R> where
    R: Send,
    <A as DualAlphabet>::NonTerminal: Send

impl<A, R> Sync for PDualMapSystem<A, R> where
    R: Sync,
    <A as DualAlphabet>::NonTerminal: Sync

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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