depthFirstSearchNext(fst, next, paths, exploredArcs, accessible);
/** * Initialization of a depth first search recursion */ private static void depthFirstSearch(Fst fst, HashSet<State> accessible, ArrayList<ArrayList<State>> paths, ArrayList<Arc>[] exploredArcs, HashSet<State> coaccessible) { State currentState = fst.getStart(); State nextState = currentState; do { if (!accessible.contains(currentState)) { nextState = depthFirstSearchNext(fst, currentState, paths, exploredArcs, accessible); } } while (currentState.getId() != nextState.getId()); int numStates = fst.getNumStates(); for (int i = 0; i < numStates; i++) { State s = fst.getState(i); if (s.getFinalWeight() != fst.getSemiring().zero()) { calcCoAccessible(fst, s, paths, coaccessible); } } }
depthFirstSearchNext(fst, next, paths, exploredArcs, accessible);
/** * Initialization of a depth first search recursion */ private static void depthFirstSearch(Fst fst, HashSet<State> accessible, ArrayList<ArrayList<State>> paths, ArrayList<Arc>[] exploredArcs, HashSet<State> coaccessible) { State currentState = fst.getStart(); State nextState = currentState; do { if (!accessible.contains(currentState)) { nextState = depthFirstSearchNext(fst, currentState, paths, exploredArcs, accessible); } } while (currentState.getId() != nextState.getId()); int numStates = fst.getNumStates(); for (int i = 0; i < numStates; i++) { State s = fst.getState(i); if (s.getFinalWeight() != fst.getSemiring().zero()) { calcCoAccessible(fst, s, paths, coaccessible); } } }