EdgeAnnotatedNFABuilder

Builder for NFAs enriched with annotations on transitions.

Companion
object
trait Completer[S, T, NA, DA]
trait StatesMixin[S, T]
trait Clearable
trait Pretty
trait Graphable[S, T, EdgeAnnotatedAutomatonStyle]
class Object
trait Matchable
class Any

Value members

Inherited methods

Inherited from
Growable
def accepts(string: Seq[T]): Boolean
Inherited from
NFABuilder
def addETransition(s1: S, s2: S): Unit
Inherited from
NFABuilder
override
Definition Classes
Inherited from
FABuilder
Inherited from
NFABuilder
def addState(s: S): Unit
Inherited from
StatesMixin
def addTransition(s1: S, t: T, s2: S): Unit
Inherited from
NFABuilder
protected
def afterStatePlot(sb: StringBuilder, style: EdgeAnnotatedAutomatonStyle[S, T, NA], stateList: IndexedSeq[S], stateMap: Map[S, Int]): Unit
Inherited from
UnindexedFA
override
def annotated(src: S, label: T, dest: S): Boolean
def annotation(src: S, dest: S): Option[NA]
def annotation(src: S, label: T, dest: S): Option[NA]
protected
def assembleNFA(statesSeq: IndexedSeq[S], initials: Set[Int], finals: Set[Int], transitionsSeq: IndexedSeq[T], labelsArray: Array[Array[Set[Int]]], epsilonsArray: Array[Set[Int]], labelledEdgeAnnotations: Array[Array[Array[Option[NA]]]], unlabelledEdgeAnnotations: Array[Array[Option[NA]]]): EdgeAnnotatedNFA[S, T, NA, DA]
Inherited from
Completer
override protected
def assembleNFA(statesSeq: IndexedSeq[S], initials: Set[Int], finals: Set[Int], transitionsSeq: IndexedSeq[T], labelsArray: Array[Array[Set[Int]]], epsilonsArray: Array[Set[Int]]): EdgeAnnotatedNFA[S, T, NA, DA]
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
protected
Inherited from
NFABuilder
final override protected
def derivedNFA[S0, T0](stateSeq: IndexedSeq[S0], transitionsSeq: IndexedSeq[T0], initialStateIndices: Set[Int], finalStateIndices: Set[Int], transitionsMatrix: Array[Array[Set[Int]]], epsilonsArray: Array[Set[Int]]): EdgeAnnotatedNFA[S0, T0, NA, DA]
def dump(out: PrintStream): Unit
Inherited from
UnindexedFA
override
def eAnnotation(src: S, dest: S): Option[NA]
override
Definition Classes
Inherited from
NFABuilder
def eTransitions(s: S): Set[S]
Inherited from
NFABuilder
protected
def edgeText(style: EdgeAnnotatedAutomatonStyle[S, T, NA], si0: Int, s0: S, si1: Int, s1: S): String
Inherited from
UnindexedFA
protected
def edgeText(style: EdgeAnnotatedAutomatonStyle[S, T, NA], 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
def foreachETransition(action: (S, S) => Unit): Unit
Inherited from
NFABuilder
override
def foreachEdgeAnnotation(action: (S, S, NA) => 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, NA) => 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: EdgeAnnotatedAutomatonStyle[S, T, NA]): 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, NA]): 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
Inherited from
NFABuilder
protected
def internalsToDOT(stateList: IndexedSeq[S], stateMap: Map[S, Int], theLabels: IndexedSeq[T], sb: StringBuilder)(using style: EdgeAnnotatedAutomatonStyle[S, T, NA]): 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
Inherited from
NFABuilder
def isState(s: S): Boolean
Inherited from
StatesMixin
Inherited from
Growable
Inherited from
NFABuilder
override
def map[S2, T2](stateMap: S => S2, transitionMap: T => T2): EdgeAnnotatedNFA[S2, T2, NA, DA, Set, EdgeAnnotatedDFA, EdgeAnnotatedAutomatonStyle, EdgeAnnotatedAutomatonStyle]
def mapResult[NewTo](f: EdgeAnnotatedNFA[S, T, NA, DA] => NewTo): Builder[EdgeAnnotatedNFAelements[S, T, NA], NewTo]
Inherited from
Builder

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, NA], 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, NA], 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, NA], 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, NA]): 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
def removeAnnotation(src: S, label: T, dest: S): Unit
def removeEAnnotation(src: S, dest: S): Unit
def removeETransition(s1: S, s2: S): Unit
Inherited from
NFABuilder
override
Definition Classes
Inherited from
FABuilder
Inherited from
NFABuilder
def removeState(s: S): Unit
Inherited from
StatesMixin
def removeTransition(s1: S, t: T, s2: S): Unit
Inherited from
NFABuilder

Creates an immutable NFA corresponding to the automaton described to this builder. This method creates elements of the internal state of the NFA, and passes them to the abstract method assembleNFA: the actual definition of assembleNFA is in the concrete classes (of package org.maraist.fa) implementing this trait.

Creates an immutable NFA corresponding to the automaton described to this builder. This method creates elements of the internal state of the NFA, and passes them to the abstract method assembleNFA: the actual definition of assembleNFA is in the concrete classes (of package org.maraist.fa) implementing this trait.

Inherited from
NFABuilder
def setAnnotation(src: S, label: T, dest: S, annotation: NA): Unit
def setEAnnotation(src: S, dest: S, annotation: NA): Unit
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
Inherited from
NFABuilder
override
Definition Classes
UnindexedFA -> Graphable
Inherited from
UnindexedFA
override
Definition Classes
Inherited from
UnindexedFA
def transitions(s: S, t: T): Set[S]
Inherited from
NFABuilder

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
Inherited from
NFABuilder
protected

Storage for all final state objects.

Storage for all final state objects.

Inherited from
FABuilder
protected
Inherited from
NFABuilder
protected
Inherited from
NFABuilder