public class ClusterStylingPolicy extends Object implements ClassStylingPolicy
Modifier and Type | Field and Description |
---|---|
(package private) Clustering<?> |
clustering
Clustering in use.
|
(package private) TObjectIntMap<Cluster<?>> |
cmap
Map from cluster objects to color offsets.
|
(package private) TIntArrayList |
colors
Colors
|
(package private) ArrayList<DBIDs> |
ids
Object IDs
|
Constructor and Description |
---|
ClusterStylingPolicy(Clustering<?> clustering,
StyleLibrary style)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
classSize(int cnum)
Get the number of elements in the styling class.
|
Clustering<?> |
getClustering()
Get the clustering used by this styling policy
|
int |
getColorForDBID(DBIDRef id)
Get the color for an individual object.
|
int |
getMaxStyle()
Get the maximum style in use.
|
String |
getMenuName()
Name to display in the menu.
|
int |
getMinStyle()
Get the minimum style in use.
|
int |
getStyleForCluster(Cluster<?> c)
Get the style number for a cluster.
|
int |
getStyleForDBID(DBIDRef id)
Get the style number for a particular object
|
DBIDIter |
iterateClass(int cnum)
Iterate over all objects from a given class.
|
TObjectIntMap<Cluster<?>> cmap
TIntArrayList colors
Clustering<?> clustering
public ClusterStylingPolicy(Clustering<?> clustering, StyleLibrary style)
clustering
- Clustering to use.public int getStyleForDBID(DBIDRef id)
ClassStylingPolicy
getStyleForDBID
in interface ClassStylingPolicy
id
- Object IDpublic int getColorForDBID(DBIDRef id)
StylingPolicy
getColorForDBID
in interface StylingPolicy
id
- Object IDpublic int getMinStyle()
ClassStylingPolicy
getMinStyle
in interface ClassStylingPolicy
public int getMaxStyle()
ClassStylingPolicy
getMaxStyle
in interface ClassStylingPolicy
public DBIDIter iterateClass(int cnum)
ClassStylingPolicy
iterateClass
in interface ClassStylingPolicy
cnum
- Class numberpublic int classSize(int cnum)
ClassStylingPolicy
classSize
in interface ClassStylingPolicy
cnum
- Class numberpublic Clustering<?> getClustering()
public int getStyleForCluster(Cluster<?> c)
c
- Clusterpublic String getMenuName()
VisualizationItem
null
or empty string.getMenuName
in interface VisualizationItem
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.