Changes by danie
This commit is contained in:
parent
8a6ea12b68
commit
e6ef99bb8b
1 changed files with 5 additions and 1 deletions
|
|
@ -300,7 +300,7 @@ public class NFAImpl implements NFA {
|
|||
|
||||
}
|
||||
// build new Transition
|
||||
dfaTransitions.add(new Transition(Integer.toString(dfaStates.indexOf(currentState)), letter, Integer.toString(dfaStates.indexOf(newState))));
|
||||
dfaTransitions.add(new Transition(getIndexOfSet(currentState, dfaStates), letter, getIndexOfSet(newState, dfaStates)));
|
||||
|
||||
// we got to change this to only a string is given
|
||||
//dfaTransitions.add(new Transition(currentState, letter, newState));
|
||||
|
|
@ -388,4 +388,8 @@ public class NFAImpl implements NFA {
|
|||
return false;
|
||||
}
|
||||
|
||||
private String getIndexOfSet(Set<String> set, List<Set<String>> dfaStates){
|
||||
return Integer.toString(dfaStates.indexOf(set));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue