Class ClusterStylingPolicy

    • Field Detail

      • ids

        java.util.ArrayList<DBIDs> ids
        Object IDs.
      • cmap

        it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<Cluster<?>> cmap
        Map from cluster objects to color offsets.
      • colors

        it.unimi.dsi.fastutil.ints.IntArrayList colors
        Colors
      • clustering

        Clustering<?> clustering
        Clustering in use.
      • minint

        double minint
        Intensity scaling
      • maxint

        double maxint
        Intensity scaling
    • Constructor Detail

      • ClusterStylingPolicy

        public ClusterStylingPolicy​(Clustering<?> clustering,
                                    StyleLibrary style)
        Constructor.
        Parameters:
        clustering - Clustering to use.
    • Method Detail

      • getColorForDBID

        public int getColorForDBID​(DBIDRef id)
        Description copied from interface: StylingPolicy
        Get the color for an individual object.

        Note: if possible, use a class styling policy which can optimize better.

        Specified by:
        getColorForDBID in interface StylingPolicy
        Parameters:
        id - Object ID
        Returns:
        Color value
      • getIntensityForDBID

        public double getIntensityForDBID​(DBIDRef id)
        Description copied from interface: StylingPolicy
        Get the Intensity for an individual object.

        Note: if possible, use a class styling policy which can optimize better.

        Specified by:
        getIntensityForDBID in interface StylingPolicy
        Parameters:
        id - Object ID
        Returns:
        Intensity value
      • iterateClass

        public DBIDIter iterateClass​(int cnum)
        Description copied from interface: ClassStylingPolicy
        Iterate over all objects from a given class.
        Specified by:
        iterateClass in interface ClassStylingPolicy
        Parameters:
        cnum - Class number
        Returns:
        Iterator over object IDs
      • classSize

        public int classSize​(int cnum)
        Description copied from interface: ClassStylingPolicy
        Get the number of elements in the styling class.
        Specified by:
        classSize in interface ClassStylingPolicy
        Parameters:
        cnum - Class number
        Returns:
        Size of class.
      • getClustering

        public Clustering<?> getClustering()
        Get the clustering used by this styling policy
        Returns:
        Clustering in use
      • getStyleForCluster

        public int getStyleForCluster​(Cluster<?> c)
        Get the style number for a cluster.
        Parameters:
        c - Cluster
        Returns:
        Style number
      • getMenuName

        public java.lang.String getMenuName()
        Description copied from interface: VisualizationItem
        Name to display in the menu. May be null or empty string.
        Specified by:
        getMenuName in interface VisualizationItem
        Returns:
        Menu name.