
public class ClusterStylingPolicy extends Object implements ClassStylingPolicy
| Modifier and Type | Field and Description | 
|---|---|
(package private) Clustering<?> | 
clustering
Clustering in use. 
 | 
(package private) gnu.trove.map.TObjectIntMap<Cluster<?>> | 
cmap
Map from cluster objects to color offsets. 
 | 
(package private) gnu.trove.list.array.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. 
 | 
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. 
 | 
gnu.trove.map.TObjectIntMap<Cluster<?>> cmap
gnu.trove.list.array.TIntArrayList colors
Clustering<?> clustering
public ClusterStylingPolicy(Clustering<?> clustering, StyleLibrary style)
clustering - Clustering to use.public int getStyleForDBID(DBIDRef id)
ClassStylingPolicygetStyleForDBID in interface ClassStylingPolicyid - Object IDpublic int getColorForDBID(DBIDRef id)
StylingPolicygetColorForDBID in interface StylingPolicyid - Object IDpublic int getMinStyle()
ClassStylingPolicygetMinStyle in interface ClassStylingPolicypublic int getMaxStyle()
ClassStylingPolicygetMaxStyle in interface ClassStylingPolicypublic DBIDIter iterateClass(int cnum)
ClassStylingPolicyiterateClass in interface ClassStylingPolicycnum - Class numberpublic int classSize(int cnum)
ClassStylingPolicyclassSize in interface ClassStylingPolicycnum - Class numberpublic Clustering<?> getClustering()
public int getStyleForCluster(Cluster<?> c)
c - Cluster