Search in sources :

Example 11 with SetDBIDs

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();
    }
}
Also used : SetDBIDs(de.lmu.ifi.dbs.elki.database.ids.SetDBIDs)

Aggregations

SetDBIDs (de.lmu.ifi.dbs.elki.database.ids.SetDBIDs)11 DBIDs (de.lmu.ifi.dbs.elki.database.ids.DBIDs)6 Database (de.lmu.ifi.dbs.elki.database.Database)5 ArrayModifiableDBIDs (de.lmu.ifi.dbs.elki.database.ids.ArrayModifiableDBIDs)5 OutlierResult (de.lmu.ifi.dbs.elki.result.outlier.OutlierResult)5 HashSetModifiableDBIDs (de.lmu.ifi.dbs.elki.database.ids.HashSetModifiableDBIDs)4 ArrayList (java.util.ArrayList)3 DBIDIter (de.lmu.ifi.dbs.elki.database.ids.DBIDIter)2 KNNList (de.lmu.ifi.dbs.elki.database.ids.KNNList)2 ModifiableDBIDs (de.lmu.ifi.dbs.elki.database.ids.ModifiableDBIDs)2 StepProgress (de.lmu.ifi.dbs.elki.logging.progress.StepProgress)2 OrderingResult (de.lmu.ifi.dbs.elki.result.OrderingResult)2 MultivariateGaussianModel (de.lmu.ifi.dbs.elki.algorithm.clustering.em.MultivariateGaussianModel)1 Clustering (de.lmu.ifi.dbs.elki.data.Clustering)1 Subspace (de.lmu.ifi.dbs.elki.data.Subspace)1 SortDBIDsBySingleDimension (de.lmu.ifi.dbs.elki.data.VectorUtil.SortDBIDsBySingleDimension)1 SubspaceModel (de.lmu.ifi.dbs.elki.data.model.SubspaceModel)1 ArrayDBIDs (de.lmu.ifi.dbs.elki.database.ids.ArrayDBIDs)1 DBIDArrayIter (de.lmu.ifi.dbs.elki.database.ids.DBIDArrayIter)1 DoubleDBIDList (de.lmu.ifi.dbs.elki.database.ids.DoubleDBIDList)1