if (items.size() > cellLimit) {     Iterator it = items.keySet().iterator(); while (it.hasNext() && items.size() > cellLimit) it.remove(); }
throw new UnsupportedOperationException("need to implement cell " + "limiting, now that we no " + "longer have sorted [NT,i,j] " + "cells!");
  protected void prune(SortedMap items) {    if (pruneFact > 0.0) {      // remove the lowest probability elements until the lowest one      // left is within pruneFact of highest      // N.B.: since this method is called every time an item is added to      // to the chart, the while loop should only have at most one iteration      double topProb = ((Double)items.lastKey()).doubleValue();      double lowestProbKey = topProb - pruneFact;      Iterator it = items.keySet().iterator();      while (it.hasNext()) {        Double currKey = (Double)it.next();        if (currKey.doubleValue() < lowestProbKey)          it.remove();        else          break;      }    }    if (cellLimit > 0) {      if (items.size() > cellLimit) { // don't create iterator if no need        // remove lowest prob items until the set size is equal to the limit        // N.B.: since this method is called every time an item is added to        // the chart, the while loop should only have at most one iteration        Iterator it = items.keySet().iterator();        while (it.hasNext() && items.size() > cellLimit)          it.remove();      }    }  }