return newMap;
}
for (Iterator i = featureToMatchesMap.keySet().iterator();
i.hasNext() && !monitor.isCancelRequested();
) {
Feature oldKey = (Feature) i.next();
featuresProcessed++;
monitor.report(featuresProcessed, totalFeatures, "features inverted");
Matches oldMatches = (Matches) featureToMatchesMap.get(oldKey);
for (int j = 0; j < oldMatches.size(); j++) {
Feature newKey = oldMatches.getFeature(j);
Matches newMatches = (Matches) newMap.get(newKey);
if (newMatches == null) {
newMatches = new Matches(oldKey.getSchema());
}
newMatches.add(oldKey, oldMatches.getScore(j));