public class EMClusterVisualization.Instance extends AbstractScatterplotVisualization
Modifier and Type | Field and Description |
---|---|
private int |
drawStyle
Round or boxed.
|
static java.lang.String |
EMBORDER
Generic tags to indicate the type of element.
|
private static double |
KAPPA
Kappa constant.
|
private static double |
MKAPPA
Minus Kappa constant.
|
private int |
opacStyle
Opacity
|
private int |
softBorder
Soft or hard border
|
proj, rel, sample
context, layer, svgp, task
Constructor and Description |
---|
Instance(VisualizerContext context,
VisualizationTask task,
VisualizationPlot plot,
double width,
double height,
Projection proj)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
drawArc(SVGPath path,
double[] cent,
double[] pre,
double[] nex,
double[] oPrev,
double[] oNext,
double scale)
Draw an arc to simulate the hyper ellipse.
|
protected void |
drawHullArc(java.lang.String sname,
double[] cent,
Polygon chres)
Approximate the hull using arcs.
|
protected void |
drawHullLines(java.lang.String sname,
double[] cent,
Polygon chres)
Approximate by convex hull.
|
protected void |
drawSphere2D(java.lang.String sname,
double[] cent,
double[][] pc)
Draw by approximating a sphere via cubic splines
|
private double[] |
equalsPlusTimes(double[] out,
double[] x,
double[] y,
double a)
Compute out = x + y * a, for 2d.
|
void |
fullRedraw()
Request a full redrawing of the visualization.
|
protected Polygon |
makeHull(double[][] pc)
Build a convex hull to approximate the sphere.
|
protected Polygon |
makeHullComplex(double[][] pc)
Build a convex hull to approximate the sphere.
|
setupCanvas, setupCanvas, visualizationChanged
addListeners, contentChanged, destroy, getHeight, getLayer, getWidth, incrementalRedraw, resultAdded, resultChanged, resultRemoved
public static final java.lang.String EMBORDER
private static final double KAPPA
private static final double MKAPPA
private int opacStyle
private int softBorder
private int drawStyle
public Instance(VisualizerContext context, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj)
context
- Visualizer contexttask
- VisualizationTaskplot
- Plot to draw towidth
- Embedding widthheight
- Embedding heightproj
- Projectionpublic void fullRedraw()
Visualization
fullRedraw
in interface Visualization
fullRedraw
in class AbstractVisualization
protected void drawSphere2D(java.lang.String sname, double[] cent, double[][] pc)
sname
- CSS class namecent
- centerpc
- Principal componentsprivate double[] equalsPlusTimes(double[] out, double[] x, double[] y, double a)
out
- Output bufferx
- Xy
- Ya
- Scalingprotected void drawHullLines(java.lang.String sname, double[] cent, Polygon chres)
sname
- CSS namecent
- centerchres
- Polygon around centerprotected Polygon makeHull(double[][] pc)
pc
- Principal componentsprotected Polygon makeHullComplex(double[][] pc)
pc
- Principal componentsprotected void drawHullArc(java.lang.String sname, double[] cent, Polygon chres)
sname
- CSS namecent
- Centerchres
- Polygonprivate void drawArc(SVGPath path, double[] cent, double[] pre, double[] nex, double[] oPrev, double[] oNext, double scale)
path
- Path to draw tocent
- Centerpre
- Previous pointnex
- Next pointscale
- Scaling factorCopyright © 2019 ELKI Development Team. License information.