case class Dfa(accept: BitSet, edges: Array[Edges]) extends Product with Serializable
DFA stands for deterministic finite-state automaton.
Invariants:
- the start ID == 0
- accept.size == edges.length
- Alphabetic
- By Inheritance
- Dfa
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val accept: BitSet
-
def
accepts(s: String): Boolean
Returns whether this DFA accepts the given string or not.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val edges: Array[Edges]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
minimize: Dfa
Hopcroft's DFA minimization algorithm.
Hopcroft's DFA minimization algorithm.
Produce a new DFA with the minimal number of states that accepts the same language (i.e. the same set of strings).
This method does not prune unreachable states. In practice the DFAs we build only have states that are reachable and that can lead to an accepting state. In the future we may provide a method to prune states that are either unreachable from start or that cannot lead to an accepting state.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
rejects(s: String): Boolean
Returns whether this DFA rejects the given string or not.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
Print a string representation the DFA.
Print a string representation the DFA.
The starting state (0) is printed first. Any accepting state is printed surrounded by brackets (e.g. [4]).
- Definition Classes
- Dfa → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()