use of de.lmu.ifi.dbs.elki.database.ids.SetDBIDs in project elki by elki-project.
the class Segments method recursivelyFill.
private void recursivelyFill(List<List<? extends Cluster<?>>> cs) {
final int numclusterings = cs.size();
Iterator<? extends Cluster<?>> iter = cs.get(0).iterator();
int[] path = new int[numclusterings];
for (int cnum = 0; iter.hasNext(); cnum++) {
Cluster<?> clust = iter.next();
path[0] = cnum;
if (numclusterings > 1) {
SetDBIDs idset = DBIDUtil.ensureSet(clust.getIDs());
recursivelyFill(cs, 1, idset, idset, path, true);
} else {
// Add to results.
makeOrUpdateSegment(path, clust.getIDs(), clust.size() * (clust.size() - 1));
}
totalObjects += clust.size();
}
}
Aggregations