public class ClusterStylingPolicy extends java.lang.Object implements ClassStylingPolicy
Modifier and Type | Field and Description |
---|---|
(package private) Clustering<?> |
clustering
Clustering in use.
|
(package private) it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<Cluster<?>> |
cmap
Map from cluster objects to color offsets.
|
(package private) it.unimi.dsi.fastutil.ints.IntArrayList |
colors
Colors
|
(package private) java.util.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.
|
java.lang.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.
|
java.util.ArrayList<DBIDs> ids
it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<Cluster<?>> cmap
it.unimi.dsi.fastutil.ints.IntArrayList 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 java.lang.String getMenuName()
VisualizationItem
null
or empty string.getMenuName
in interface VisualizationItem
Copyright © 2019 ELKI Development Team. License information.