[−][src]Struct lindenmayer_system::parametric::PDualMapSystem
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]
A: DualAlphabet,
Rule: ParametricRule,
<Rule as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
<Rule as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
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]
R: Rng,
F: FnMut(&mut R, Option<&Rule>),
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]
R: Rng,
F: FnMut(&mut R, Option<&mut Rule>),
pub fn each_rule<F>(&self, callback: F) where
F: FnMut(&Rule),
[src]
F: FnMut(&Rule),
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]
A: DualAlphabet,
R: ParametricRule,
<R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
<R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
type Rule = R
fn apply_first_rule(
&self,
sym: &<Self::Rule as ParametricRule>::OutSym
) -> Option<Vec<<Self::Rule as ParametricRule>::OutSym>>
[src]
&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)
[src]
&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. Read more
fn develop(
&self,
axiom: Vec<<Self::Rule as ParametricRule>::OutSym>,
max_iterations: usize
) -> (Vec<<Self::Rule as ParametricRule>::OutSym>, usize)
[src]
&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.
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]
A: DualAlphabet,
R: ParametricRule,
<R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
<R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
A::NonTerminal: Clone,
fn clone(&self) -> PDualMapSystem<A, R>
[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]
A: DualAlphabet,
R: ParametricRule,
<R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
<R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
A::NonTerminal: Debug,
Auto Trait Implementations
impl<A, R> Send for PDualMapSystem<A, R> where
R: Send,
<A as DualAlphabet>::NonTerminal: Send,
R: Send,
<A as DualAlphabet>::NonTerminal: Send,
impl<A, R> Sync for PDualMapSystem<A, R> where
R: Sync,
<A as DualAlphabet>::NonTerminal: Sync,
R: Sync,
<A as DualAlphabet>::NonTerminal: Sync,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,