Search in sources :

Example 1 with IndexTree

use of de.lmu.ifi.dbs.elki.index.tree.IndexTree in project elki by elki-project.

the class IndexStatistics method processNewResult.

@Override
public void processNewResult(ResultHierarchy hier, Result newResult) {
    Database db = ResultUtil.findDatabase(hier);
    Collection<String> header = null;
    final ArrayList<IndexTree<?, ?>> indexes = ResultUtil.filterResults(hier, newResult, IndexTree.class);
    if (indexes == null || indexes.isEmpty()) {
        return;
    }
    for (IndexTree<?, ?> index : indexes) {
        header = new ArrayList<>();
        header.add(index.toString());
    }
    Collection<Pair<String, String>> col = new ArrayList<>();
    IndexMetaResult analysis = new IndexMetaResult(col, header);
    db.getHierarchy().add(db, analysis);
}
Also used : IndexTree(de.lmu.ifi.dbs.elki.index.tree.IndexTree) Database(de.lmu.ifi.dbs.elki.database.Database) ArrayList(java.util.ArrayList) Pair(de.lmu.ifi.dbs.elki.utilities.pairs.Pair)

Aggregations

Database (de.lmu.ifi.dbs.elki.database.Database)1 IndexTree (de.lmu.ifi.dbs.elki.index.tree.IndexTree)1 Pair (de.lmu.ifi.dbs.elki.utilities.pairs.Pair)1 ArrayList (java.util.ArrayList)1