pub struct PDualMapSystem<A, R>where
A: DualAlphabet,
R: ParametricRule,
<R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
<R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,{ /* private fields */ }Expand description
Distinguishes between terminal symbols and non-terminals. Rules are only allowed on non-terminals.
Implementations§
Source§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>,
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>,
pub fn new() -> PDualMapSystem<A, Rule>
pub fn add_rule(&mut self, rule: Rule) -> bool
pub fn with_random_rule<R, F>(&self, rng: &mut R, callback: F)
pub fn with_random_rule_mut<R, F>(&mut self, rng: &mut R, callback: F)
Trait Implementations§
Source§impl<A, R> Clone for PDualMapSystem<A, R>where
A: DualAlphabet + Clone,
R: ParametricRule + Clone,
<R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
<R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
A::NonTerminal: Clone,
impl<A, R> Clone for PDualMapSystem<A, R>where
A: DualAlphabet + Clone,
R: ParametricRule + Clone,
<R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
<R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
A::NonTerminal: Clone,
Source§fn clone(&self) -> PDualMapSystem<A, R>
fn clone(&self) -> PDualMapSystem<A, R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<A, R> Debug for PDualMapSystem<A, R>where
A: DualAlphabet + Debug,
R: ParametricRule + Debug,
<R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
<R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
A::NonTerminal: Debug,
impl<A, R> Debug for PDualMapSystem<A, R>where
A: DualAlphabet + Debug,
R: ParametricRule + Debug,
<R as ParametricRule>::InSym: ParametricSymbol<Sym = A>,
<R as ParametricRule>::OutSym: ParametricSymbol<Sym = A>,
A::NonTerminal: Debug,
Source§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>,
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>,
type Rule = R
fn apply_first_rule( &self, sym: &<Self::Rule as ParametricRule>::OutSym, ) -> Option<Vec<<Self::Rule as ParametricRule>::OutSym>>
Source§fn develop_next(
&self,
axiom: &Vec<<Self::Rule as ParametricRule>::OutSym>,
) -> (Vec<<Self::Rule as ParametricRule>::OutSym>, usize)
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.
Auto Trait Implementations§
impl<A, R> Freeze for PDualMapSystem<A, R>
impl<A, R> RefUnwindSafe for PDualMapSystem<A, R>where
<R as ParametricRule>::OutSym: Sized,
<R as ParametricRule>::InSym: Sized,
<A as DualAlphabet>::NonTerminal: RefUnwindSafe,
R: RefUnwindSafe,
impl<A, R> Send for PDualMapSystem<A, R>where
<R as ParametricRule>::OutSym: Sized,
<R as ParametricRule>::InSym: Sized,
<A as DualAlphabet>::NonTerminal: Send,
R: Send,
impl<A, R> Sync for PDualMapSystem<A, R>where
<R as ParametricRule>::OutSym: Sized,
<R as ParametricRule>::InSym: Sized,
<A as DualAlphabet>::NonTerminal: Sync,
R: Sync,
impl<A, R> Unpin for PDualMapSystem<A, R>
impl<A, R> UnwindSafe for PDualMapSystem<A, R>where
<R as ParametricRule>::OutSym: Sized,
<R as ParametricRule>::InSym: Sized,
<A as DualAlphabet>::NonTerminal: RefUnwindSafe,
R: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more