Automata Docs Automata Docs
Automata Docs Automata Docs

Search Results for

    Edit this page

    Struct EpsilonTransition

    An epsilon transition in an automaton, defined by a starting state and an ending state.

    Implements
    IComparable<EpsilonTransition>
    IEquatable<EpsilonTransition>
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Automata.Core
    Assembly: Automata.Core.dll
    Syntax
    public readonly record struct EpsilonTransition : IComparable<EpsilonTransition>, IEquatable<EpsilonTransition>
    Remarks

    An epsilon transition is a transition that lacks a symbol. Epsilon transitions can only exist in non-deterministic finite automata (NFA).

    Constructors

    | Edit this page View Source

    EpsilonTransition(int, int)

    Initializes a new instance of the EpsilonTransition struct.

    Declaration
    public EpsilonTransition(int fromState, int toState)
    Parameters
    Type Name Description
    int fromState

    The state origin of the transition.

    int toState

    The destination state of the transition.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if any of arguments has a negative value.

    Fields

    | Edit this page View Source

    Epsilon

    String representation for ε - the empty epsilon string. Epsilon is not part of any alphabet; the symbol is used solely for output purposes, never for computation.

    Declaration
    public const string Epsilon = "ε"
    Field Value
    Type Description
    string

    Properties

    | Edit this page View Source

    FromState

    The state origin of the transition.

    Declaration
    public int FromState { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    ToState

    The destination state of the transition.

    Declaration
    public int ToState { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    CompareTo(EpsilonTransition)

    Compares the current epsilon transition to another epsilon transition.

    Declaration
    public int CompareTo(EpsilonTransition other)
    Parameters
    Type Name Description
    EpsilonTransition other

    Other epsilon transition to compare to.

    Returns
    Type Description
    int

    An integer that indicates the relative order of the objects being compared.

    | Edit this page View Source

    Reverse()

    Reverses the epsilon transition.

    Declaration
    public EpsilonTransition Reverse()
    Returns
    Type Description
    EpsilonTransition

    A new EpsilonTransition with the from and to states swapped.

    | Edit this page View Source

    ToString()

    String that represents the current transition.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current transition.

    Overrides
    ValueType.ToString()

    Implements

    IComparable<T>
    IEquatable<T>