[−][src]Trait free_algebra::monoid::MonoidRule
Dictates a rule for how to multiply or add letters to a MonoidalString's word
The simplest possible version of this simply applies multiplication as simple concatenation, but this trait is robust enough to support more complex operations such as for FreeGroup
Required methods
fn apply(word: Vec<C>, letter: C) -> Vec<C>
Applies the operation rule to the product of a word and a single letter
Provided methods
fn apply_many(word1: Vec<C>, word2: Vec<C>) -> Vec<C>
Applies the operation rule to the product of two words
By default, this computes the result by individually applying the rule to each letter of the second word to the first using MonoidRule::apply
fn apply_iter<I: Iterator<Item = C>>(word: Vec<C>, letters: I) -> Vec<C>
Applies the operation rule to the product of a word and a sequence of letters
By default, this computes the result by individually applying the rule to each letter in sequence to the first using MonoidRule::apply