src/main/java/de/dfki/lt/loot/fsa/algo/Determinization.java
private static <EdgeInfo> Queue<TIntHashSet> initUnmarkedStates(
      AbstractAutomaton<EdgeInfo> nonDetAutomaton,
      Map<TIntHashSet, Integer> nfa2dfaStates,
      AbstractAutomaton<EdgeInfo> detAutomaton) {

    // init
    Queue<TIntHashSet> unmarkedStates = new LinkedList<TIntHashSet>();

    // get epsilon closure of initial NFA state; this corresponds to the initial
    // state of the DFA
    TIntHashSet initialEpsClosure = new TIntHashSet();
    initialEpsClosure.add(nonDetAutomaton.getInitialState());
    expandWithEpsilonClosure(nonDetAutomaton, initialEpsClosure);

    // take the initial DFA state and map it to the epsilon closure of the
    // NFA initial state
    int dfaInitState = detAutomaton.newVertex();
    detAutomaton.setInitialState(dfaInitState);
    if (isFinal(nonDetAutomaton, initialEpsClosure)) {
      detAutomaton.setFinalState(dfaInitState);
    }
    nfa2dfaStates.put(initialEpsClosure, dfaInitState);

    // add the state to unmarked: since every new DFA state will only be marked
    // once, we implement this using a queue of states; marking will then be
    // equivalent to removing the state from the unmarked state queue
    unmarkedStates.add(initialEpsClosure);

    return unmarkedStates;
  }
/**
   * This initializes the queue of unmarked DFA states, represented by sets of
   * NFA states.
   *
   * @param nfa2dfaStates a <code>Map</code> that maps NFA state sets to a
   * single state of the DFA
   * @param detAutomaton a <code>FinateAutomaton</code> with the deterministic
   * automaton
   * @return a <code>Queue</code> with a single unmarked DFA state that is the
   * initial state
   */
This initializes the queue of unmarked DFA states, represented by sets of
NFA states.

@param nfa2dfaStates a Map that maps NFA state sets to a
single state of the DFA
@param detAutomaton a FinateAutomaton with the deterministic
automaton
@return a Queue with a single unmarked DFA state that is the
initial state
This initializes the queue of unmarked DFA states represented by sets of NFA states . @param nfa2dfaStates a Map that maps NFA state sets to a single state of the DFA @param detAutomaton a FinateAutomaton with the deterministic automaton @return a Queue with a single unmarked DFA state that is the initial state
private static <EdgeInfo> Queue<TIntHashSet> initUnmarkedStates(
      AbstractAutomaton<EdgeInfo> nonDetAutomaton,
      Map<TIntHashSet, Integer> nfa2dfaStates,
      AbstractAutomaton<EdgeInfo> detAutomaton) {
    Queue<TIntHashSet> unmarkedStates = new LinkedList<TIntHashSet>();
    TIntHashSet initialEpsClosure = new TIntHashSet();
    initialEpsClosure.add(nonDetAutomaton.getInitialState());
    expandWithEpsilonClosure(nonDetAutomaton, initialEpsClosure);
    int dfaInitState = detAutomaton.newVertex();
    detAutomaton.setInitialState(dfaInitState);
    if (isFinal(nonDetAutomaton, initialEpsClosure)) {
      detAutomaton.setFinalState(dfaInitState);
    }
    nfa2dfaStates.put(initialEpsClosure, dfaInitState);
    unmarkedStates.add(initialEpsClosure);
    return unmarkedStates;
  }
private static < EdgeInfo > Queue < TIntHashSet > initUnmarkedStates ( AbstractAutomaton < EdgeInfo > nonDetAutomaton , Map < TIntHashSet , Integer > nfa2dfaStates , AbstractAutomaton < EdgeInfo > detAutomaton ) { Queue < TIntHashSet > unmarkedStates = new LinkedList < TIntHashSet > ( ) ; TIntHashSet initialEpsClosure = new TIntHashSet ( ) ; initialEpsClosure . add ( nonDetAutomaton . getInitialState ( ) ) ; expandWithEpsilonClosure ( nonDetAutomaton , initialEpsClosure ) ; int dfaInitState = detAutomaton . newVertex ( ) ; detAutomaton . setInitialState ( dfaInitState ) ; if ( isFinal ( nonDetAutomaton , initialEpsClosure ) ) { detAutomaton . setFinalState ( dfaInitState ) ; } nfa2dfaStates . put ( initialEpsClosure , dfaInitState ) ; unmarkedStates . add ( initialEpsClosure ) ; return unmarkedStates ; }
This initializes the queue of unmarked DFA states, represented by sets of
 NFA states.
This initializes the queue of unmarked DFA states represented by sets of NFA states .
// init // get epsilon closure of initial NFA state; this corresponds to the initial // state of the DFA // take the initial DFA state and map it to the epsilon closure of the // NFA initial state // add the state to unmarked: since every new DFA state will only be marked // once, we implement this using a queue of states; marking will then be // equivalent to removing the state from the unmarked state queue