private void ukkonenExtendSuffixTree(int arrayIdx) { logger.entering("UkkonenSuffixTree", "ukkonenExtendSuffixTree"); logger.log(Level.FINEST, String.format("Ukkonen Algorithm String #%d", arrayIdx)); TreeString string = strings.get(arrayIdx); extState = new UkkonenState(string); logger.log( Level.FINEST, String.format("Ukkonen: (%d,%d)", extState.nextPhaseStart, extState.string.length())); for (int phase = extState.nextPhaseStart; phase < extState.string.length(); phase++) { ukkonenSPA(phase); System.err.println(String.format("Phase %d results: ", phase)); print(System.err); System.err.println(); System.err.flush(); } logger.log(Level.FINEST, String.format("Finishing edges: %d", extState.lastE)); extState.finishFinalEdges(); System.err.println(String.format("Finished results: ")); print(System.err); System.err.println(); System.err.flush(); logger.exiting("UkkonenSuffixTree", "ukkonenExtendSuffixTree"); }
private void naiveExtendSuffixTree(int arrayIdx) { TreeString string = strings.get(arrayIdx); // the array.length-1 constraint, instead of array.length, is because // we assume that the terminal character has already been added to the // string, and we don't want to *just* add the suffix that is that // character. for (int i = 0; i <= string.length(); i++) { logger.log( Level.FINEST, String.format("Naive Extension: \"%s\"", string.substring(i, string.length() + 1))); naiveExtendSuffix(string, i); } }
public TreeString getString(int i) { return strings.get(i); }