EdgeAnnotatedDFABuilder

Instantiable builder for edge-annotated DFAs using `HashSet`s and `HashMap`s.

Type Params
S

The type of all states of the automaton

T

The type of labels on (non-epsilon) transitions of the automaton

Value members

Inherited methods

Inherited from
Growable
override
def accepts(string: Seq[T]): Boolean
Definition Classes
Inherited from
UnindexedDFA
override
Definition Classes
Inherited from
FABuilder
override
def addInitialAnnotation(annotation: A): Unit

Set the initial annotation "before" the initial state.

Set the initial annotation "before" the initial state.

Definition Classes
Inherited from
EdgeAnnotatedDFABuilder

Helper method for the scala.collection.mutable.Builder implementation.

Helper method for the scala.collection.mutable.Builder implementation.

Definition Classes
Inherited from
EdgeAnnotatedDFABuilder
def addState(s: S): Unit
Inherited from
StatesMixin
override
def addTransition(s1: S, t: T, s2: S): Unit
Definition Classes
Inherited from
DFABuilder
protected
def afterStatePlot(sb: StringBuilder, style: EdgeAnnotatedAutomatonStyle[S, T, A], stateList: IndexedSeq[S], stateMap: Map[S, Int]): Unit
Inherited from
UnindexedFA
override
def annotated(src: S, label: T, dest: S): Boolean
override
def annotation(src: S, label: T, dest: S): Option[A]
override
def annotation(src: S, label: T): Option[A]
final override protected
def assembleDFA(statesSeq: IndexedSeq[S], initialIdx: Int, finalStateIndices: HashSet[Int], transitionsSeq: IndexedSeq[T], idxLabels: Array[Array[Int]]): EdgeAnnotatedDFA[S, T, A]
protected
def assemblePrettyTransition(before: Doc, arrow: Doc, after: Doc): Doc
Inherited from
UnindexedFA
protected
Inherited from
UnindexedFA
override
def clear(): Unit

Clear this builder. When overriding this method, it is important to call super.clear().

Clear this builder. When overriding this method, it is important to call super.clear().

Definition Classes
Inherited from
FABuilder
override protected
Definition Classes
Inherited from
DFABuilder
override protected
def derivedDFA[S0, T0](stateSeq: IndexedSeq[S0], transitionsSeq: IndexedSeq[T0], initialIdx: Int, finalStateIndices: Set[Int], transitionsMatrix: Array[Array[Int]]): EdgeAnnotatedDFA[S0, T0, A]
Inherited from
DFABuilder
def dump(out: PrintStream): Unit
Inherited from
UnindexedFA
override
def eAnnotation(src: S, dest: S): Option[A]
override
Definition Classes
Inherited from
UnindexedDFA
protected
def edgeText(style: EdgeAnnotatedAutomatonStyle[S, T, A], si0: Int, s0: S, si1: Int, s1: S): String
Inherited from
UnindexedFA
protected
def edgeText(style: EdgeAnnotatedAutomatonStyle[S, T, A], si0: Int, s0: S, ti0: Int, t: T, si1: Int, s1: S): String
Inherited from
UnindexedFA
override
Definition Classes
Inherited from
FABuilder
protected
Inherited from
UnindexedFA
override
def foreachETransition(action: (S, S) => Unit { def apply(s1: S, s2: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedDFA
override
def foreachEdgeAnnotation(action: (S, S, A) => Any): Unit

Perform an action for every annotated unlabelled edge in this automaton.

Perform an action for every annotated unlabelled edge in this automaton.

Definition Classes
Inherited from
UnindexedEdgeAnnotatedFA
override
def foreachEdgeAnnotation(action: (S, T, S, A) => Any): Unit

Perform an action for every annotated labelled edge in this automaton.

Perform an action for every annotated labelled edge in this automaton.

Definition Classes
Inherited from
UnindexedEdgeAnnotatedFA
override
def foreachFinalState(action: S => Unit { def apply(s: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedFA
override
def foreachInitialState(action: S => Unit { def apply(s: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedFA
override
def foreachState(action: S => Unit { def apply(s: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedFA
override
def foreachTransition(action: (S, T, S) => Unit { def apply(s1: S, t: T, s2: S): Unit; }): Unit
Definition Classes
Inherited from
UnindexedFA
protected
def getEdgeAnnotatedArray(statesSeq: IndexedSeq[S], transitionsSeq: IndexedSeq[T]): Array[Array[Option[A]]]
def graphviz(sourceFile: String, outputFile: String)(using options: EdgeAnnotatedAutomatonStyle[S, T, A]): 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: EdgeAnnotatedAutomatonStyle[S, T, A]): 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
protected
def initPlot(sb: StringBuilder, states: Int, labels: Int): Unit
Inherited from
UnindexedFA

Return whether there is an annotation associated "before" the initial state.

Return whether there is an annotation associated "before" the initial state.

Definition Classes
Inherited from
EdgeAnnotatedDFABuilder

Return any annotation associated "before" the initial state.

Return any annotation associated "before" the initial state.

Inherited from
EdgeAnnotatedDFABuilder
override
Definition Classes
Inherited from
UnindexedDFA
protected
def internalsToDOT(stateList: IndexedSeq[S], stateMap: Map[S, Int], theLabels: IndexedSeq[T], sb: StringBuilder)(using style: EdgeAnnotatedAutomatonStyle[S, T, A]): Unit

Internal routine used by [[#toDOT]]. Subclesses may override, but still call super.internalsToDOT, to extend the Graphviz representation of a DFA.

Internal routine used by [[#toDOT]]. Subclesses may override, but still call super.internalsToDOT, to extend the Graphviz representation of a DFA.

Inherited from
UnindexedFA
override
Definition Classes
Inherited from
FABuilder
override
Definition Classes
Inherited from
DFABuilder
def isState(s: S): Boolean
Inherited from
StatesMixin
Inherited from
Growable
override
def labels: Set[T]
Definition Classes
Inherited from
DFABuilder
override
def map[S2, T2](stateMap: S => S2, transitionMap: T => T2): EdgeAnnotatedDFA[S2, T2, A]
def map[S2, T2, A2](stateMap: S => S2, transitionMap: T => T2, annMap: A => A2): EdgeAnnotatedDFA[S2, T2, A2]
def mapAnnotations[A2](annMap: A => A2): EdgeAnnotatedDFA[S, T, A2]
def mapResult[NewTo](f: EdgeAnnotatedDFA[S, T, A] => NewTo): Builder[EdgeAnnotatedDFAelements[S, T, A], NewTo]
Inherited from
Builder
override
def mapStates[S2](stateMap: S => S2): EdgeAnnotatedDFA[S2, T, A]
override
def mapTransitions[T2](transitionMap: T => T2): EdgeAnnotatedDFA[S, T2, A]
protected

Add decorations for an initial state.

Add decorations for an initial state.

Inherited from
UnindexedFA
override protected
def plotPresentEdge(sb: StringBuilder, style: EdgeAnnotatedAutomatonStyle[S, T, A], stateList: IndexedSeq[S], stateMap: Map[S, Int], si0: Int, s0: S, si1: Int, s1: S): Unit
override protected
def plotPresentEdge(sb: StringBuilder, style: EdgeAnnotatedAutomatonStyle[S, T, A], stateList: IndexedSeq[S], stateMap: Map[S, Int], si0: Int, s0: S, ti0: Int, t: T, si1: Int, s1: S): Unit
protected
def plotState(sb: StringBuilder, style: EdgeAnnotatedAutomatonStyle[S, T, A], si: Int, s: S, isInitial: Boolean, isFinal: Boolean): Unit
Inherited from
UnindexedFA
protected
def plotTransitions(stateList: IndexedSeq[S], stateMap: Map[S, Int], theLabels: IndexedSeq[T], sb: StringBuilder, style: EdgeAnnotatedAutomatonStyle[S, T, A]): Unit
Inherited from
UnindexedFA
def pretty: Doc
Inherited from
UnindexedFA
protected
def prettyETransition(src: S, dest: S): Doc
Inherited from
UnindexedFA
override protected
def prettyETransitionArrow(src: S, dest: S): Doc
protected
def prettyFooter: Doc
Inherited from
UnindexedFA
override protected
def prettyHeader: Doc
protected
def prettyState(s: S): Doc
Inherited from
UnindexedFA
protected
def prettyStateInTransition(state: S): Doc
Inherited from
UnindexedFA
protected
def prettyStateLeader(s: S): Doc
Inherited from
UnindexedFA
protected
def prettyStates: Doc
Inherited from
UnindexedFA
protected
def prettyTransition(src: S, label: T, dest: S): Doc
Inherited from
UnindexedFA
override protected
def prettyTransitionArrow(src: S, label: T, dest: S): Doc
protected
Inherited from
UnindexedFA
override
def removeAnnotation(src: S, label: T): Unit
override
def removeAnnotation(src: S, label: T, dest: S): Unit
override
Definition Classes
Inherited from
FABuilder

Remove any initial annotation "before" the initial state.

Remove any initial annotation "before" the initial state.

Definition Classes
Inherited from
EdgeAnnotatedDFABuilder
def removeState(s: S): Unit
Inherited from
StatesMixin
override
def removeTransition(s1: S, t: T): Unit
Definition Classes
Inherited from
DFABuilder
Inherited from
DFABuilder
override
def setAnnotation(src: S, label: T, dest: S, annotation: A): Unit
override
def setAnnotation(src: S, label: T, annotation: A): Unit
override
Definition Classes
Inherited from
DFABuilder
def size: Int
Inherited from
StatesMixin
final
def sizeHint(coll: IterableOnce[_], delta: Int): Unit
Inherited from
Builder
def sizeHint(size: Int): Unit
Inherited from
Builder
final
def sizeHintBounded(size: Int, boundingColl: Iterable[_]): Unit
Inherited from
Builder
def states: Set[S]
Inherited from
StatesMixin
override
Definition Classes
UnindexedFA -> Graphable
Inherited from
UnindexedFA
override
def transition(s: S, t: T): Option[S]
Definition Classes
Inherited from
DFABuilder
override
Definition Classes
Inherited from
UnindexedFA
override
def transitions(s: S, t: T): Set[S]
Definition Classes
Inherited from
UnindexedDFA

Deprecated and Inherited methods

@inline @deprecated(message = "Use `++=` aka `addAll` instead of varargs `+=`; infix operations with an operand of multiple args will be deprecated", since = "2.13.0")
Deprecated
[Since version 2.13.0] Use `++=` aka `addAll` instead of varargs `+=`; infix operations with an operand of multiple args will be deprecated
Inherited from
Growable

Inherited fields

protected

Storage for all state objects

Storage for all state objects

Inherited from
StatesMixin
protected
protected

Storage for all final state objects.

Storage for all final state objects.

Inherited from
FABuilder
protected
protected
Inherited from
DFABuilder
protected
Inherited from
DFABuilder