FormeleMethode/Automata.cs
/// <summary>
/// Looks to which state is reachable for a certain symbol
/// </summary>
/// <param name="states">The states.</param>
Looks to which state is reachable for a certain symbol
Looks to which state is reachable for a certain symbol
public List<T> Delta(List<T> states, char symbol)
		{
			SortedSet<T> reachableStates = new SortedSet<T>();
			foreach (Transition<T> trans in transitions)
			{
				if (states.Contains(trans.GetFromState()) && trans.GetSymbol() == symbol)
				{
					reachableStates.Add(trans.GetToState());
				}
			}
			List<T> reachableWithEpsilon = reachableStates.ToList();
			foreach (T reachableState in reachableStates)
			{
				reachableWithEpsilon.AddRange(EClosure(reachableState));
			}
			return reachableWithEpsilon.Distinct().ToList();
		}
public List < T > Delta ( List < T > states , char symbol ) { SortedSet < T > reachableStates = new SortedSet < T > ( ) ; foreach ( Transition < T > trans in transitions ) { if ( states . Contains ( trans . GetFromState ( ) ) && trans . GetSymbol ( ) == symbol ) { reachableStates . Add ( trans . GetToState ( ) ) ; } } List < T > reachableWithEpsilon = reachableStates . ToList ( ) ; foreach ( T reachableState in reachableStates ) { reachableWithEpsilon . AddRange ( EClosure ( reachableState ) ) ; } return reachableWithEpsilon . Distinct ( ) . ToList ( ) ; }
Looks to which state is reachable for a certain symbol
Looks to which state is reachable for a certain symbol
// Check for transistions where the from state is present in the 'states' parameter and matching symbol // Add the toState to the reachables states // Check for all reachable states if there are states connected with epsilon which are per  // Definition also reachable // Return list without duplicates
states
List<T>
None
symbol
char