Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.opticsplot
Class OPTICSPlot<D extends Distance<?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.visualization.opticsplot.OPTICSPlot<D>
Type Parameters:
D - Distance type

public class OPTICSPlot<D extends Distance<?>>
extends Object

Class to produce an OPTICS plot image.

Author:
Erich Schubert

Field Summary
(package private)  ClusterOrderResult<D> co
          The result to plot
(package private)  OPTICSColorAdapter colors
          Color adapter to use
(package private)  OPTICSDistanceAdapter<D> distanceAdapter
          The mapping from cluster order entry to value
(package private)  int height
          Height of plot
protected  Logging logger
          Logger
protected  RenderedImage plot
          The Optics plot.
(package private)  LinearScale scale
          Scale to use
(package private)  int width
          Width of plot
 
Constructor Summary
OPTICSPlot(ClusterOrderResult<D> co, OPTICSColorAdapter colors, OPTICSDistanceAdapter<D> distanceAdapter)
          Constructor.
 
Method Summary
protected  LinearScale computeScale(List<ClusterOrderEntry<D>> order)
          Compute the scale (value range)
 int getHeight()
           
 RenderedImage getPlot()
          Get the OPTICS plot.
 double getRatio()
          Get width-to-height ratio of image.
 LinearScale getScale()
           
 int getWidth()
           
 void replot()
          Trigger a redraw of the OPTICS plot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Logging logger
Logger


scale

LinearScale scale
Scale to use


width

int width
Width of plot


height

int height
Height of plot


co

final ClusterOrderResult<D extends Distance<?>> co
The result to plot


colors

final OPTICSColorAdapter colors
Color adapter to use


distanceAdapter

final OPTICSDistanceAdapter<D extends Distance<?>> distanceAdapter
The mapping from cluster order entry to value


plot

protected RenderedImage plot
The Optics plot.

Constructor Detail

OPTICSPlot

public OPTICSPlot(ClusterOrderResult<D> co,
                  OPTICSColorAdapter colors,
                  OPTICSDistanceAdapter<D> distanceAdapter)
Constructor.

Parameters:
co - Cluster order to plot.
colors - Colorization strategy
distanceAdapter - Distance adapter
Method Detail

replot

public void replot()
Trigger a redraw of the OPTICS plot


computeScale

protected LinearScale computeScale(List<ClusterOrderEntry<D>> order)
Compute the scale (value range)

Parameters:
order - Cluster order to process
Returns:
Scale for value range of cluster order

getScale

public LinearScale getScale()
Returns:
the scale

getWidth

public int getWidth()
Returns:
the width

getHeight

public int getHeight()
Returns:
the height

getRatio

public double getRatio()
Get width-to-height ratio of image.

Returns:
width / height

getPlot

public RenderedImage getPlot()
Get the OPTICS plot.

Returns:
plot image

Release 0.3 (2010-03-31_1612)