FormeleMethode/NdfaToDfaConverter.cs
/// <summary>
/// Checks how many routes havent been taken if result is 0 it means it has to go to a fuik.
/// </summary>
/// <param name="states">The states.</param>
/// <param name="symbol">The symbol.</param>
/// <param name="ndfa">The ndfa.</param>
/// <returns></returns>
Checks how many routes havent been taken if result is 0 it means it has to go to a fuik.
Checks how many routes havent been taken if result is 0 it means it has to go to a fuik .
private static int CheckAvailableRoutes(string[] states, char symbol, Automata<string> ndfa)
		{
			int AmountOfCorrectRoutes = 0;
			foreach (string state in states)
			{
				var debugVar = ndfa.GetTransitions(state);
				if (ndfa.GetTransitions(state).Count(t => t.GetSymbol() == symbol) > AmountOfCorrectRoutes)
				{
					AmountOfCorrectRoutes = ndfa.GetTransitions(state).Count(t => t.GetSymbol() == symbol);
				}
			}
			return AmountOfCorrectRoutes;
		}
private static int CheckAvailableRoutes ( string [ ] states , char symbol , Automata < string > ndfa ) { int AmountOfCorrectRoutes = 0 ; foreach ( string state in states ) { var debugVar = ndfa . GetTransitions ( state ) ; if ( ndfa . GetTransitions ( state ) . Count ( t => t . GetSymbol ( ) == symbol ) > AmountOfCorrectRoutes ) { AmountOfCorrectRoutes = ndfa . GetTransitions ( state ) . Count ( t => t . GetSymbol ( ) == symbol ) ; } } return AmountOfCorrectRoutes ; }
Checks how many routes havent been taken if result is 0 it means it has to go to a fuik.
Checks how many routes havent been taken if result is 0 it means it has to go to a fuik .
None
states
string[]
None
symbol
char
None
ndfa
Automata<string>
None