EdgeAnnotatedDFABuilder

trait EdgeAnnotatedDFABuilder[S, T, A, +D <: (EdgeAnnotatedDFA), -K >: EdgeAnnotatedDFAelements[S, T, A] <: Matchable, -Z <: (EdgeAnnotatedAutomatonStyle)]() extends EdgeAnnotatedDFABuilder[S, T, A, D, K, Z] with UnindexedEdgeAnnotatedFA[S, T, A, Z] with DFABuilder[S, T, D, K, Z]

Partial implementation of a builder for DFAs using `HashSet`s and `HashMap`s.

Type Params
D

Type of DFA constructed by this builder.

K

Builder elements for this builder.

S

The type of all states of the automaton

T

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

Z

Type of style options for Graphviz export

trait DFABuilder[S, T, D, K, Z]
trait FABuilder[S, T, D, K, Z]
trait StatesMixin[S, T]
trait UnindexedDFA[S, T, Z]
trait DFABuilder[S, T, D, K, Z]
trait UnindexedFA[S, T, Z]
trait UnindexedDFA[S, T, Z]
trait FABuilder[S, T, D, K, Z]
trait UnindexedFA[S, T, Z]
trait Pretty
trait Graphable[S, T, Z]
trait Builder[K, D[S, T, A]]
trait Growable[K]
trait Clearable
class Object
trait Matchable
class Any

Value members

Abstract methods

protected
def assembleDFA(statesSeq: IndexedSeq[S], initialIdx: Int, finalStateIndices: HashSet[Int], transitionsSeq: IndexedSeq[T], idxLabels: Array[Array[Int]], edgeAnnotationsArray: Array[Array[Option[A]]]): D[S, T, A]
protected
def derivedDFA[S0, T0, A0](stateSeq: IndexedSeq[S0], transitionsSeq: IndexedSeq[T0], initialStateIndex: Int, finalStateIndices: Set[Int], transitionsMatrix: Array[Array[Int]], edgeAnnotations: Array[Array[Option[A0]]], initialAnn: Option[A0]): D[S0, T0, A0]

Concrete methods

override
def addInitialAnnotation(annotation: A): Unit

Set the initial annotation "before" the initial state.

Set the initial annotation "before" the initial state.

Definition Classes
override
def addOne(builder: K): EdgeAnnotatedDFABuilder[S, T, A, D, K, Z]

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

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

Definition Classes
override
def annotated(src: S, label: T, dest: S): Boolean
override
def annotation(src: S, label: T): Option[A]
Definition Classes
override
def annotation(src: S, label: T, dest: S): Option[A]
Definition Classes
final override protected
def assembleDFA(statesSeq: IndexedSeq[S], initialIdx: Int, finalStateIndices: HashSet[Int], transitionsSeq: IndexedSeq[T], idxLabels: Array[Array[Int]]): D[S, T, A]
Definition Classes
override protected
def derivedDFA[S0, T0](stateSeq: IndexedSeq[S0], transitionsSeq: IndexedSeq[T0], initialIdx: Int, finalStateIndices: Set[Int], transitionsMatrix: Array[Array[Int]]): D[S0, T0, A]
Definition Classes
override
def eAnnotated(src: S, dest: S): Boolean
override
def eAnnotation(src: S, dest: S): Option[A]
Definition Classes
protected
def getEdgeAnnotatedArray(statesSeq: IndexedSeq[S], transitionsSeq: IndexedSeq[T]): Array[Array[Option[A]]]

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

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

Definition Classes

Return any annotation associated "before" the initial state.

Return any annotation associated "before" the initial state.

def map[S2, T2, A2](stateMap: S => S2, transitionMap: T => T2, annMap: A => A2): D[S2, T2, A2]
override
def map[S2, T2](stateMap: S => S2, transitionMap: T => T2): D[S2, T2, A]
Definition Classes
def mapAnnotations[A2](annMap: A => A2): D[S, T, A2]
override
def mapStates[S2](stateMap: S => S2): D[S2, T, A]
Definition Classes
override
def mapTransitions[T2](transitionMap: T => T2): D[S, T2, A]
Definition Classes
override
def removeAnnotation(src: S, label: T, dest: S): Unit
Definition Classes
override
def removeAnnotation(src: S, label: T): Unit
Definition Classes

Remove any initial annotation "before" the initial state.

Remove any initial annotation "before" the initial state.

Definition Classes
override
def setAnnotation(src: S, label: T, annotation: A): Unit
Definition Classes
override
def setAnnotation(src: S, label: T, dest: S, annotation: A): Unit
Definition Classes

Inherited methods

final
Inherited from
Growable
final
def +=(elem: K): EdgeAnnotatedDFABuilder[S, T, A, D, K, Z]
Inherited from
Growable
override
def accepts(string: Seq[T]): Boolean
Definition Classes
Inherited from
UnindexedDFA
Inherited from
Growable
override
Definition Classes
Inherited from
FABuilder
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: Z[S, T, A], stateList: IndexedSeq[S], stateMap: Map[S, Int]): Unit
Inherited from
UnindexedFA
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
Inherited from
DFABuilder
def dump(out: PrintStream): Unit
Inherited from
UnindexedFA
override
Definition Classes
Inherited from
UnindexedDFA
protected
def edgeText(style: Z[S, T, A], si0: Int, s0: S, si1: Int, s1: S): String
Inherited from
UnindexedFA
protected
def edgeText(style: Z[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
def graphviz(sourceFile: String, outputFile: String)(using options: Z[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: Z[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
override
Definition Classes
Inherited from
DFABuilder
override
Definition Classes
Inherited from
UnindexedDFA
protected
def internalsToDOT(stateList: IndexedSeq[S], stateMap: Map[S, Int], theLabels: IndexedSeq[T], sb: StringBuilder)(using style: Z[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
def mapResult[NewTo](f: D[S, T, A] => NewTo): Builder[K, NewTo]
Inherited from
Builder
protected
def plotInitialStateMarker(sb: StringBuilder, style: Z[S, T, A], s: S, idx: Int): Unit

Add decorations for an initial state.

Add decorations for an initial state.

Inherited from
UnindexedFA
override protected
def plotPresentEdge(sb: StringBuilder, style: Z[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: Z[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: Z[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: Z[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
Definition Classes
Inherited from
DFABuilder
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
Definition Classes
Inherited from
FABuilder
def removeState(s: S): Unit
Inherited from
StatesMixin
override
def removeTransition(s1: S, t: T): Unit
Definition Classes
Inherited from
DFABuilder
def result(): D[S, T, A]
Inherited from
DFABuilder
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
def toDOT(using Z[S, T, A]): String
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")
final
def +=(elem1: K, elem2: K, elems: K*): EdgeAnnotatedDFABuilder[S, T, A, D, K, Z]
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

Concrete fields

protected
protected

Inherited fields

protected

Storage for all state objects

Storage for all state objects

Inherited from
StatesMixin
protected

Storage for all final state objects.

Storage for all final state objects.

Inherited from
FABuilder
protected
Inherited from
DFABuilder
protected
Inherited from
DFABuilder