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.


Field Summary
private  HashMap<DBID,Integer> idToColor
          The final mapping of object IDs to colors.
private static 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 static final Logging logger
Logger


idToColor

private final HashMap<DBID,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.4.0 (2011-09-20_1324)