private void incrementCTFromRangeMaps( PredictedActualBinaryContingencyTable ct, RangeMap pred, RangeMap real) { // By looping through the predictions, can get at TP and FP Set<IntervalRangeMapValue> pv = pred.values(); Iterator<IntervalRangeMapValue> pvi = pv.iterator(); while (pvi.hasNext()) { IntervalRangeMapValue irmv = pvi.next(); Set<IntervalRangeMapValue> vals = real.find(irmv.start, irmv.end); if (vals.size() == 0) { ct.incrementFP(); } else { IntervalRangeMapValue val = vals.iterator().next(); if (val.start == irmv.start && val.end == irmv.end) { ct.incrementTP(); } else { ct.incrementFP(); } } } Set<IntervalRangeMapValue> rv = real.values(); Iterator<IntervalRangeMapValue> rvi = rv.iterator(); while (rvi.hasNext()) { IntervalRangeMapValue irmv = rvi.next(); if (!pred.hasEntry(irmv.start, irmv.end)) { ct.incrementFN(); } Set<IntervalRangeMapValue> vals = pred.find(irmv.start, irmv.end); if (vals.size() == 0) { ct.incrementFN(); } else { IntervalRangeMapValue val = vals.iterator().next(); if (val.start == irmv.start && val.end == irmv.end) { } else { ct.incrementFN(); } } } }