Class KeyVisualization

  • All Implemented Interfaces:
    VisualizationProcessor, VisFactory

    public class KeyVisualization
    extends java.lang.Object
    implements VisFactory
    Visualizer, displaying the key for a clustering.

    TODO: re-add automatic sizing depending on the number of clusters.

    TODO: also show in scatter plot detail view.

    Since:
    0.3
    Author:
    Erich Schubert
    • Field Detail

      • NAME

        private static final java.lang.String NAME
        Name for this visualizer.
        See Also:
        Constant Field Values
    • Constructor Detail

      • KeyVisualization

        public KeyVisualization()
    • Method Detail

      • findDepth

        protected static <M extends Model> int[] findDepth​(Clustering<M> c)
        Compute the size of the clustering.
        Parameters:
        c - Clustering
        Returns:
        Array storing the depth and the number of leaf nodes.
      • findDepth

        private static <M extends Model> void findDepth​(Hierarchy<Cluster<M>> hier,
                                                        Cluster<M> cluster,
                                                        int[] size)
        Recursive depth computation.
        Parameters:
        hier - Hierarchy
        cluster - Current cluster
        size - Counting array.
      • getPreferredColumns

        protected static int getPreferredColumns​(double width,
                                                 double height,
                                                 int numc,
                                                 double maxwidth)
        Compute the preferred number of columns.
        Parameters:
        width - Target width
        height - Target height
        numc - Number of clusters
        maxwidth - Max width of entries
        Returns:
        Preferred number of columns
      • allowThumbnails

        public boolean allowThumbnails​(VisualizationTask task)
        Description copied from interface: VisFactory
        Test whether to do a thumbnail or a full rendering. Override this with "false" to disable thumbnails!
        Specified by:
        allowThumbnails in interface VisFactory
        Parameters:
        task - Task requested