UnindexedFA

trait UnindexedFA[S, T, -Z <: (AutomatonStyle)] extends Graphable[S, T, Z] with Pretty

Core methods of any automaton.

Type Params
S

Type representing states.

T

Type representing transition labels.

Z

Type of style options for Graphviz export

trait Pretty
trait Graphable[S, T, Z]
class Object
trait Matchable
class Any
trait UnindexedFA[S, T, Z]
trait FA[S, T, Z]
trait DFA[S, T, Z]
class DFA[S, T]
trait EdgeAnnotatedDFA[S, T, A, Z]
trait NFA[S, T, G, D, NZ, DZ]
class NFA[S, T]
trait EdgeAnnotatedNFA[S, T, NA, DA, G, D, NZ, DZ]
trait FABuilder[S, T, A, K, Z]
trait DFABuilder[S, T, D, K, Z]
class DFABuilder[S, T]
trait NFABuilder[S, T, G, D, N, K, NZ, DZ]
class NFABuilder[S, T]
trait EdgeAnnotatedNFABuilder[S, T, NA, DA, G, D, N, K, NZ, DZ]
trait UnindexedDFA[S, T, Z]
trait UnindexedPFA[S, T, Z]
trait PFA[S, T, Z]
class PFA[S, T]
trait PFABuilder[S, T, A, K, Z]
class PFABuilder[S, T]
trait FA[S, T, Z]
trait DFA[S, T, Z]
trait EdgeAnnotatedDFA[S, T, A, Z]
trait EdgeAnnotatedFA[S, T, A, Z]
trait EdgeAnnotatedNFA[S, T, NA, DA, G, D, NZ, DZ]
trait NFA[S, T, G, D, NZ, DZ]
trait PFA[S, T, Z]
trait FABuilder[S, T, A, K, Z]
trait DFABuilder[S, T, D, K, Z]
trait EdgeAnnotatedNFABuilder[S, T, NA, DA, G, D, N, K, NZ, DZ]
trait NFABuilder[S, T, G, D, N, K, NZ, DZ]
trait UnindexedDFA[S, T, Z]
trait UnindexedNFA[S, T, G, D, NZ, DZ]
trait UnindexedPFA[S, T, Z]
trait PFABuilder[S, T, A, K, Z]

Value members

Abstract methods

def accepts(string: Seq[T]): Boolean

Returns true if this automaton accepts the given string.

Returns true if this automaton accepts the given string.

Return the pairs comprising all unlabelled transitions.

Return the pairs comprising all unlabelled transitions.

Returns the Set of final states in this automaton.

Returns the Set of final states in this automaton.

def foreachETransition(action: (S, S) => Unit { def apply(s1: S, s2: S): Unit; }): Unit

Perform some action for each epsilon transition in the automaton. Note that in many (deterministic) automata, this method is a no-op, but in included for an easy consistency.

Perform some action for each epsilon transition in the automaton. Note that in many (deterministic) automata, this method is a no-op, but in included for an easy consistency.

def foreachFinalState(action: S => Unit { def apply(s: S): Unit; }): Unit

Perform some action for each final state in the automaton.

Perform some action for each final state in the automaton.

def foreachInitialState(action: S => Unit { def apply(s: S): Unit; }): Unit

Perform some action for each initial state in the automaton.

Perform some action for each initial state in the automaton.

def foreachState(action: S => Unit { def apply(s: S): Unit; }): Unit

Perform some action for each state in the automaton.

Perform some action for each state in the automaton.

def foreachTransition(action: (S, T, S) => Unit { def apply(s1: S, t: T, s2: S): Unit; }): Unit

Perform some action for each transition in the automaton.

Perform some action for each transition in the automaton.

Returns the Set of initial states in this automaton.

Returns the Set of initial states in this automaton.

Returns whether the given state s is final in this automaton.

Returns whether the given state s is final in this automaton.

Returns whether the given state s is initial in this automaton.

Returns whether the given state s is initial in this automaton.

def isState(s: S): Boolean

Returns true if s is used as a state

Returns true if s is used as a state

Set of automaton transition labels

Set of automaton transition labels

def map[S2, T2](stateMap: S => S2, transitionMap: T => T2): UnindexedFA[S2, T2, Z]

Derive a new isomorphic automaton from this one by applying transforms to the states and transitions. This method does not check that either map is injective: if they are not, then the result may be unpredictable.

Derive a new isomorphic automaton from this one by applying transforms to the states and transitions. This method does not check that either map is injective: if they are not, then the result may be unpredictable.

def mapStates[S2](stateMap: S => S2): UnindexedFA[S2, T, Z]

Derive a new isomorphic automaton from this one by applying transforms to the states. This method does not check that the stateMap is injective: if it is not, then the result may have separate states which cannot be distinguished.

Derive a new isomorphic automaton from this one by applying transforms to the states. This method does not check that the stateMap is injective: if it is not, then the result may have separate states which cannot be distinguished.

def mapTransitions[T2](transitionMap: T => T2): UnindexedFA[S, T2, Z]

Derive a new isomorphic automaton from this one by applying transforms to the transitions. This method does not check that the transitionMap is injective: if it is not, then the result may have separate transitions which cannot be distinguished.

Derive a new isomorphic automaton from this one by applying transforms to the transitions. This method does not check that the transitionMap is injective: if it is not, then the result may have separate transitions which cannot be distinguished.

def size: Int

Number of states in the automaton

Number of states in the automaton

The states themselves

The states themselves

Return the triples comprising all labelled transitions.

Return the triples comprising all labelled transitions.

def transitions(s: S, t: T): Set[S]

Returns the (possibly empty, and in deterministic implementations at most singleton) set of states into which the automaton could transition starting from s via a transition labelled t.

Returns the (possibly empty, and in deterministic implementations at most singleton) set of states into which the automaton could transition starting from s via a transition labelled t.

Inherited methods

def graphviz(sourceFile: String, outputFile: String)(using options: Z[S, T]): Unit

Use Graphviz to render this object as specified.

Use Graphviz to render this object as specified.

Inherited from
Graphable
def graphviz(fileRoot: String)(using options: Z[S, T]): Unit

Use Graphviz to render this object (in the default format) to the given file.

Use Graphviz to render this object (in the default format) to the given file.

Inherited from
Graphable
def pretty: Doc
Inherited from
Pretty
def toDOT(using graphvizOptions: Z[S, T]): String

Return the inner lines of a digraph block (or other Graphviz style) to render this object.

Return the inner lines of a digraph block (or other Graphviz style) to render this object.

Inherited from
Graphable