Struct EpsilonTransition
An epsilon transition in an automaton, defined by a starting state and an ending state.
Inherited Members
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 SourceEpsilonTransition(int, int)
An epsilon transition in an automaton, defined by a starting state and an ending state.
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. |
Remarks
An epsilon transition is a transition that lacks a symbol. Epsilon transitions can only exist in non-deterministic finite automata (NFA).
Fields
| Edit this page View SourceEpsilon
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 SourceFromState
The state origin of the transition.
Declaration
public int FromState { get; init; }
Property Value
Type | Description |
---|---|
int |
ToState
The destination state of the transition.
Declaration
public int ToState { get; init; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceCompareTo(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. |
MaxTrans(int)
Declaration
public static EpsilonTransition MaxTrans(int fromState)
Parameters
Type | Name | Description |
---|---|---|
int | fromState |
Returns
Type | Description |
---|---|
EpsilonTransition |
MinTrans(int)
Declaration
public static EpsilonTransition MinTrans(int fromState)
Parameters
Type | Name | Description |
---|---|---|
int | fromState |
Returns
Type | Description |
---|---|
EpsilonTransition |
Reverse()
Reverses the epsilon transition.
Declaration
public EpsilonTransition Reverse()
Returns
Type | Description |
---|---|
EpsilonTransition | A new EpsilonTransition with the from and to states swapped. |