FormeleMethode/Automata.cs
/// <summary>
/// Reverses the DFA or NDFA.
/// 3 REVERSE
/// All transitions are reversed
/// Start states and end states switch
/// </summary>
Reverses the DFA or NDFA.
3 REVERSE
All transitions are reversed
Start states and end states switch
Reverses the DFA or NDFA . 3 REVERSE All transitions are reversed Start states and end states switch
public void ReverseAutomata()
		{
			SortedSet<T> tempStates = startStates;
			startStates = endStates;
			endStates = tempStates;
			HashSet<Transition<T>> tempTransitions = new HashSet<Transition<T>>();
			foreach (Transition<T> transition in transitions)
			{
				tempTransitions.Add(new Transition<T>(transition.GetToState(),transition.GetSymbol(),transition.GetFromState()));
			}
			transitions = tempTransitions;
		}
public void ReverseAutomata ( ) { SortedSet < T > tempStates = startStates ; startStates = endStates ; endStates = tempStates ; HashSet < Transition < T > > tempTransitions = new HashSet < Transition < T > > ( ) ; foreach ( Transition < T > transition in transitions ) { tempTransitions . Add ( new Transition < T > ( transition . GetToState ( ) , transition . GetSymbol ( ) , transition . GetFromState ( ) ) ) ; } transitions = tempTransitions ; }
Reverses the DFA or NDFA.
Reverses the DFA or NDFA .
// Reverse Start and endstates // Reverse Transitions