de.lmu.ifi.dbs.elki.visualization.opticsplot
Class OPTICSColorFromClustering
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final Logging logger
- Logger
idToColor
private final HashMap<DBID,Integer> idToColor
- The final mapping of object IDs to colors.
OPTICSColorFromClustering
public OPTICSColorFromClustering(ColorLibrary colors,
Clustering<?> refc)
- Constructor.
- Parameters:
colors
- Color library to userefc
- Clustering to use
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)