use of de.lmu.ifi.dbs.elki.utilities.pairs.Pair in project elki by elki-project.
the class CLIQUESubspace method determineClusters.
/**
* Determines all clusters in this subspace by performing a depth-first search
* algorithm to find connected dense units.
*
* @return the clusters in this subspace and the corresponding cluster models
*/
public List<Pair<Subspace, ModifiableDBIDs>> determineClusters() {
List<Pair<Subspace, ModifiableDBIDs>> clusters = new ArrayList<>();
for (CLIQUEUnit<V> unit : getDenseUnits()) {
if (!unit.isAssigned()) {
ModifiableDBIDs cluster = DBIDUtil.newHashSet();
CLIQUESubspace<V> model = new CLIQUESubspace<>(getDimensions());
clusters.add(new Pair<Subspace, ModifiableDBIDs>(model, cluster));
dfs(unit, cluster, model);
}
}
return clusters;
}
Aggregations