EdgeAnnotatedNFA

class EdgeAnnotatedNFA[S, T, NA, DA](val stateSeq: IndexedSeq[S], val initialStateIndices: Set[Int], val finalStateIndices: Set[Int], val transitionsSeq: IndexedSeq[T], val transitionsArray: Array[Array[Set[Int]]], val epsilonsArray: Array[Set[Int]], val labelledEdgeAnnotations: Array[Array[Array[Option[NA]]]], val unlabelledEdgeAnnotations: Array[Array[Option[NA]]], val combiner: EdgeAnnotationCombiner[NA, DA]) extends EdgeAnnotatedNFA[S, T, NA, DA, Set, EdgeAnnotatedDFA, EdgeAnnotatedAutomatonStyle, EdgeAnnotatedAutomatonStyle]
Companion
object

Value members

Concrete methods

def derivedNFA[S0, T0](stateSeq: IndexedSeq[S0], transitionsSeq: IndexedSeq[T0], transitionsArray: Array[Array[Set[Int]]], epsilonsArray: Array[Set[Int]], finalStateIndices: Set[Int], initialStateIndices: Set[Int], labelledEdgeAnnotations: Array[Array[Array[Option[NA]]]], unlabelledEdgeAnnotations: Array[Array[Option[NA]]]): EdgeAnnotatedNFA[S0, T0, NA, DA]

Inherited methods

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

Returns true if this automaton accepts the given string. The default implementation is to convert the NFA to a DFA, and check acceptance there. This is not necessarily good.

Returns true if this automaton accepts the given string. The default implementation is to convert the NFA to a DFA, and check acceptance there. This is not necessarily good.

Definition Classes
Inherited from
NFA
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

Check whether there is an annotation on the transition from src to dest labelled label.

Check whether there is an annotation on the transition from src to dest labelled label.

Definition Classes
Inherited from
UnindexedEdgeAnnotatedFA
def annotation(src: S, dest: S): Option[NA]

Return the annotation (if any) on the unlabelled transition from src to dest.

Return the annotation (if any) on the unlabelled transition from src to dest.

Inherited from
EdgeAnnotatedNFA
def annotation(src: S, label: T, dest: S): Option[NA]

Return the annotation (if any) on the transition from src to dest labelled label.

Return the annotation (if any) on the transition from src to dest labelled label.

Inherited from
EdgeAnnotatedNFA
def annotationIndex(srcIdx: Int, destIdx: Int): Option[NA]

Return the annotation (if any) on the unlabelled transition from the state at index srcIdx.

Return the annotation (if any) on the unlabelled transition from the state at index srcIdx.

Inherited from
EdgeAnnotatedNFA
def annotationIndex(srcIdx: Int, labelIdx: Int, destIdx: Int): Option[NA]

Return the annotation (if any) on the transition from the state at index srcIdx with the label with index labelIdx.

Return the annotation (if any) on the transition from the state at index srcIdx with the label with index labelIdx.

Inherited from
EdgeAnnotatedNFA
override protected
def assembleDFA(dfaStates: IndexedSeq[Set[S]], initialStateIdx: Int, dfaFinals: Set[Int], transitionsSeq: IndexedSeq[T], dfaTransitions: Array[Array[Int]], tracker: IndexSetsTracker, appearsIn: Array[Set[Int]]): EdgeAnnotatedDFA[Set[S], T, DA]
Definition Classes
Inherited from
EdgeAnnotatedNFA
protected
def assemblePrettyTransition(before: Doc, arrow: Doc, after: Doc): Doc
Inherited from
UnindexedFA
override protected
Definition Classes
Inherited from
FA
override
def derivedNFA[S0, T0](stateSeq: IndexedSeq[S0], transitionsSeq: IndexedSeq[T0], transitionsArray: Array[Array[Set[Int]]], epsilonsArray: Array[Set[Int]], finalStateIndices: Set[Int], initialStateIndices: Set[Int]): EdgeAnnotatedNFA[S0, T0, NA, DA, Set, EdgeAnnotatedDFA, EdgeAnnotatedAutomatonStyle, EdgeAnnotatedAutomatonStyle]
Definition Classes
Inherited from
EdgeAnnotatedNFA
protected
def dfaEdgeHook(dfaSrcIdx: Int, nfaSrcIndices: Set[Int], ti: Int, t: T, nfaDestIndices: Set[Int], dfaDestIdx: Int, tracker: IndexSetsTracker): Unit

This method serves as a hook into the Rabin-Scott implementation for variation by extensions of the classical NFA. Does nothing by default, but can be overridden in subclasses. This method is called at the point where an entry is added to the (under construction) array of DFA transitions.

This method serves as a hook into the Rabin-Scott implementation for variation by extensions of the classical NFA. Does nothing by default, but can be overridden in subclasses. This method is called at the point where an entry is added to the (under construction) array of DFA transitions.

Inherited from
NFA
def dump(out: PrintStream): Unit
Inherited from
UnindexedFA
override
def eAnnotated(src: S, dest: S): Boolean

Check whether there is an annotation on the unlabeled transition from src to dest. For automata without e-transitions, this method will always return false.

Check whether there is an annotation on the unlabeled transition from src to dest. For automata without e-transitions, this method will always return false.

Definition Classes
Inherited from
UnindexedEdgeAnnotatedFA
def eAnnotation(src: S, dest: S): Option[NA]
Inherited from
EdgeAnnotatedNFA
def eAnnotationIndex(srcIdx: Int, destIdx: Int): Option[NA]
Inherited from
EdgeAnnotatedNFA
override
Definition Classes
NFA -> NFA
Inherited from
NFA
override
Definition Classes
Inherited from
NFA
override
def eTransitions(s: S): Set[S]
Definition Classes
Inherited from
NFA
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
protected
Inherited from
NFA
protected
Inherited from
NFA
override
Definition Classes
Inherited from
NFA
protected
Inherited from
UnindexedFA
override
def foreachETransition(action: (S, S) => Unit { def apply(s1: S, s2: S): Unit; }): Unit
Definition Classes
Inherited from
NFA
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
override
Definition Classes
FA -> FA
Inherited from
FA
override
Definition Classes
FA -> FA
Inherited from
FA
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
override
Definition Classes
Inherited from
NFA
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
NFA
override
Definition Classes
Inherited from
NFA
override
def isState(s: S): Boolean
Definition Classes
Inherited from
FA
override
def label(i: Int): T
Definition Classes
FA -> FA
Inherited from
FA
override
Definition Classes
Inherited from
FA
override
def map[S2, T2](stateMap: S => S2, transitionMap: T => T2): EdgeAnnotatedNFA[S2, T2, NA, DA, Set, EdgeAnnotatedDFA, EdgeAnnotatedAutomatonStyle, EdgeAnnotatedAutomatonStyle]
Definition Classes
Inherited from
EdgeAnnotatedNFA

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
Definition Classes
Inherited from
EdgeAnnotatedNFA
protected
def prettyState(s: S): Doc
Inherited from
UnindexedFA
override protected
def prettyStateInTransition(state: S): Doc
Definition Classes
Inherited from
FA
override protected
def prettyStateLeader(s: S): Doc
Definition Classes
Inherited from
FA
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
Inherited from
NFA
override
def size: Int
Definition Classes
Inherited from
FA
override
def state(i: Int): S
Definition Classes
FA -> FA
Inherited from
FA
override
Definition Classes
Inherited from
FA
override
Definition Classes
Inherited from
NFA
override
Definition Classes
FA -> UnindexedFA -> Graphable
Inherited from
FA
override
Definition Classes
NFA -> Any
Inherited from
NFA
override
def transitionIndices(s: S, t: T): Set[Int]
Definition Classes
NFA -> NFA
Inherited from
NFA
override
Definition Classes
Inherited from
UnindexedFA
override
def transitions(s: S, t: T): Set[S]
Definition Classes
Inherited from
NFA

Concrete fields

override
override
override
override
override

Inherited fields

override
val indexOf: Map[S, Int]
Inherited from
FA
override
Inherited from
FA