Search in sources :

Example 1 with SimpleParallel

use of de.lmu.ifi.dbs.elki.visualization.projections.SimpleParallel in project elki by elki-project.

the class OpenGL3DParallelCoordinates method processNewResult.

@Override
public void processNewResult(ResultHierarchy hier, Result newResult) {
    boolean nonefound = true;
    List<Relation<?>> rels = ResultUtil.getRelations(newResult);
    for (Relation<?> rel : rels) {
        if (!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
            continue;
        }
        @SuppressWarnings("unchecked") Relation<? extends O> vrel = (Relation<? extends O>) rel;
        ScalesResult scales = ScalesResult.getScalesResult(vrel);
        ProjectionParallel proj = new SimpleParallel(null, scales.getScales());
        PropertiesBasedStyleLibrary stylelib = new PropertiesBasedStyleLibrary();
        StylingPolicy stylepol = getStylePolicy(hier, stylelib);
        new Instance<>(vrel, proj, settings, stylepol, stylelib).run();
        nonefound = false;
    }
    if (nonefound && hier.equals(newResult)) {
        LOG.warning("3DPC did not find a number vector field relation to visualize!");
    }
}
Also used : SimpleParallel(de.lmu.ifi.dbs.elki.visualization.projections.SimpleParallel) PropertiesBasedStyleLibrary(de.lmu.ifi.dbs.elki.visualization.style.PropertiesBasedStyleLibrary) ProjectionParallel(de.lmu.ifi.dbs.elki.visualization.projections.ProjectionParallel) Relation(de.lmu.ifi.dbs.elki.database.relation.Relation) ScalesResult(de.lmu.ifi.dbs.elki.result.ScalesResult) StylingPolicy(de.lmu.ifi.dbs.elki.visualization.style.StylingPolicy) ClusterStylingPolicy(de.lmu.ifi.dbs.elki.visualization.style.ClusterStylingPolicy)

Example 2 with SimpleParallel

use of de.lmu.ifi.dbs.elki.visualization.projections.SimpleParallel in project elki by elki-project.

the class ParallelPlotProjector method arrange.

@Override
public Collection<PlotItem> arrange(VisualizerContext context) {
    List<PlotItem> col = new ArrayList<>(1);
    List<VisualizationTask> tasks = context.getVisTasks(this);
    if (!tasks.isEmpty()) {
        ScalesResult scales = ScalesResult.getScalesResult(rel);
        ProjectionParallel proj = new SimpleParallel(this, scales.getScales());
        final double width = Math.max(.5, Math.ceil(MathUtil.log2(scales.getScales().length - 1)));
        final PlotItem it = new PlotItem(width, 1., proj);
        it.tasks = tasks;
        col.add(it);
    }
    return col;
}
Also used : VisualizationTask(de.lmu.ifi.dbs.elki.visualization.VisualizationTask) ScalesResult(de.lmu.ifi.dbs.elki.result.ScalesResult) SimpleParallel(de.lmu.ifi.dbs.elki.visualization.projections.SimpleParallel) ArrayList(java.util.ArrayList) PlotItem(de.lmu.ifi.dbs.elki.visualization.gui.overview.PlotItem) ProjectionParallel(de.lmu.ifi.dbs.elki.visualization.projections.ProjectionParallel)

Aggregations

ScalesResult (de.lmu.ifi.dbs.elki.result.ScalesResult)2 ProjectionParallel (de.lmu.ifi.dbs.elki.visualization.projections.ProjectionParallel)2 SimpleParallel (de.lmu.ifi.dbs.elki.visualization.projections.SimpleParallel)2 Relation (de.lmu.ifi.dbs.elki.database.relation.Relation)1 VisualizationTask (de.lmu.ifi.dbs.elki.visualization.VisualizationTask)1 PlotItem (de.lmu.ifi.dbs.elki.visualization.gui.overview.PlotItem)1 ClusterStylingPolicy (de.lmu.ifi.dbs.elki.visualization.style.ClusterStylingPolicy)1 PropertiesBasedStyleLibrary (de.lmu.ifi.dbs.elki.visualization.style.PropertiesBasedStyleLibrary)1 StylingPolicy (de.lmu.ifi.dbs.elki.visualization.style.StylingPolicy)1 ArrayList (java.util.ArrayList)1