FormeleMethode/Automata.cs
/// <summary>
/// Gets the transistions with state being the from state in the transitions.
/// </summary>
/// <param name="state">The state.</param>
/// <returns></returns>
Gets the transistions with state being the from state in the transitions.
Gets the transistions with state being the from state in the transitions .
public List<Transition<T>> GetTransitions(T state)
		{
			List<Transition<T>> trans = transitions.Where(t => t.GetFromState().Equals(state)).ToList();
			List<T> epsilonStates = trans.Where(t => t.GetSymbol() == '$' && !t.GetFromState().Equals(t.GetToState())).Select(t => t.GetToState()).ToList();
			foreach (T epsilonState in epsilonStates)
			{
				trans.AddRange(GetTransitions(epsilonState));
			}
			return trans;
		}
public List < Transition < T > > GetTransitions ( T state ) { List < Transition < T > > trans = transitions . Where ( t => t . GetFromState ( ) . Equals ( state ) ) . ToList ( ) ; List < T > epsilonStates = trans . Where ( t => t . GetSymbol ( ) == ' ' && ! t . GetFromState ( ) . Equals ( t . GetToState ( ) ) ) . Select ( t => t . GetToState ( ) ) . ToList ( ) ; foreach ( T epsilonState in epsilonStates ) { trans . AddRange ( GetTransitions ( epsilonState ) ) ; } return trans ; }
Gets the transistions with state being the from state in the transitions.
Gets the transistions with state being the from state in the transitions .
// Get all the transitions for the given state // Take all the transitions where symbol is epsilon
None
state
T
None