Packages

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
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Dfa
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Dfa(accept: BitSet, edges: Array[Edges])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val accept: BitSet
  5. def accepts(s: String): Boolean

    Returns whether this DFA accepts the given string or not.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. val edges: Array[Edges]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. 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.

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def rejects(s: String): Boolean

    Returns whether this DFA rejects the given string or not.

  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. 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
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped