Struct redfa::dfa::Dfa [] [src]

pub struct Dfa<T, V> {
    pub states: Vec<State<T, V>>,
}

A deterministic finite automaton (DFA), over the alphabet T. Each state is annotated with a value of type V. State 0 is the starting state.

Fields

The list of states.

Methods

impl<T, V> Dfa<T, V>
[src]

Construct a DFA from a list of differentiable objects. The elements of initial form the first states of the DFA. Returns the DFA, together with a mapping from derivatives to state numbers.

Apply a function to each state's value.

Find the reverse transitions from each state in the DFA.

Minimize a DFA; i.e. find a DFA with the fewest states that is equivalent to the given DFA. Two DFAs are equivalent if, given the same string, they always lead to a state with the same associated value.

impl<T, V> Dfa<T, V>
[src]

Compare DFAs by language equality.

Trait Implementations

impl<T: Debug, V: Debug> Debug for Dfa<T, V>
[src]

Formats the value using the given formatter.

impl<T: Clone, V: Clone> Clone for Dfa<T, V>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Ord, U, V: PartialEq<U>> PartialEq<Dfa<T, U>> for Dfa<T, V>
[src]

Compare DFAs by graph isomorphism.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Ord, V: Eq> Eq for Dfa<T, V>
[src]