// just go through the next set of successors
HMMStateArc[] arcs = hmmState.getSuccessors();
nextStates = new SearchStateArc[arcs.length];
for (int i = 0; i < arcs.length; i++) {
HMMStateArc arc = arcs[i];
if (arc.getHMMState().isEmitting()) {
// if its a self loop and the prob. matches
// reuse the state
if (arc.getHMMState() == hmmState
&& logInsertionProbability == arc
.getLogProbability()) {
nextStates[i] = this;
} else {
nextStates[i] = new LexTreeHMMState(
(HMMNode) getNode(), getWordHistory(),
getSmearTerm(), getSmearProb(),
arc.getHMMState(), logOne,
arc.getLogProbability(), parentNode, collapsed);
}
} else {
nextStates[i] = new LexTreeNonEmittingHMMState(
(HMMNode) getNode(), getWordHistory(),
getSmearTerm(), getSmearProb(),
arc.getHMMState(),
arc.getLogProbability(), parentNode, collapsed);
}
}
}
putCachedArcs(nextStates);
}