State[,] table = new State[MAX, MAX]; // [source state, input alphabet] -> dest state public override Transition addTransition(State s1, State s2, String point1 = null) { // Tags Info: // mypath -> sp // cb -> transition int count = 0; foreach (Transition t in s1.transitions) { if (t.sourceState == s1) { count++; } } if (count < noOfInputs) { Transition transition = new nfaTransition(); generateTransition(s1, s2, transition, point1); return(transition); } else { MessageBox.Show("In DFA you can add only one transition corresponding to one input symbol"); return(null); } }
List <State>[,] table = new List <State> [MAX, MAX];// [source state, input alphabet] -> dest states public override Transition addTransition(State s1, State s2, String point1 = null) { // Tags Info: // mypath -> sp // cb -> transition Transition transition = new nfaTransition(); generateTransition(s1, s2, transition, point1); return(transition); }