[][src]Trait lindenmayer_system::parametric::ParametricSystem

pub trait ParametricSystem {
type Rule: ParametricRule;
    fn apply_first_rule(
        &self,
        sym: &<Self::Rule as ParametricRule>::OutSym
    ) -> Option<Vec<<Self::Rule as ParametricRule>::OutSym>>; fn develop_next(
        &self,
        axiom: &Vec<<Self::Rule as ParametricRule>::OutSym>
    ) -> (Vec<<Self::Rule as ParametricRule>::OutSym>, usize) { ... }
fn develop(
        &self,
        axiom: Vec<<Self::Rule as ParametricRule>::OutSym>,
        max_iterations: usize
    ) -> (Vec<<Self::Rule as ParametricRule>::OutSym>, usize) { ... } }

Associated Types

Loading content...

Required methods

fn apply_first_rule(
    &self,
    sym: &<Self::Rule as ParametricRule>::OutSym
) -> Option<Vec<<Self::Rule as ParametricRule>::OutSym>>

Loading content...

Provided methods

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

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

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

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

Loading content...

Implementors

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]

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

impl<R> ParametricSystem for PSystem<R> where
    R: ParametricRule
[src]

type Rule = R

fn apply_first_rule(
    &self,
    sym: &<Self::Rule as ParametricRule>::OutSym
) -> Option<Vec<<Self::Rule as ParametricRule>::OutSym>>
[src]

Apply first matching rule and return expanded successor.

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

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

Loading content...