Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.opticsplot
Class OPTICSColorFromClustering

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.visualization.opticsplot.OPTICSColorFromClustering
All Implemented Interfaces:
OPTICSColorAdapter

public class OPTICSColorFromClustering
extends Object
implements OPTICSColorAdapter

Adapter that uses an existing clustering to colorize the OPTICS plot.

Author:
Erich Schubert

Field Summary
private  HashMap<Integer,Integer> idToColor
          The final mapping of object IDs to colors.
private  Logging logger
          Logger
 
Constructor Summary
OPTICSColorFromClustering(ColorLibrary colors, Clustering<?> refc)
          Constructor.
 
Method Summary
 int getColorForEntry(ClusterOrderEntry<?> coe)
          Get the color value for a particular cluster order entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private Logging logger
Logger


idToColor

private final HashMap<Integer,Integer> idToColor
The final mapping of object IDs to colors.

Constructor Detail

OPTICSColorFromClustering

public OPTICSColorFromClustering(ColorLibrary colors,
                                 Clustering<?> refc)
Constructor.

Parameters:
colors - Color library to use
refc - Clustering to use
Method Detail

getColorForEntry

public int getColorForEntry(ClusterOrderEntry<?> coe)
Description copied from interface: OPTICSColorAdapter
Get the color value for a particular cluster order entry.

Specified by:
getColorForEntry in interface OPTICSColorAdapter
Parameters:
coe - Cluster order entry
Returns:
Color value (rgba integer)

Release 0.3 (2010-03-31_1612)