Class AbstractCutDendrogram.Instance

    • Field Detail

      • leafMap

        protected it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap leafMap
        Map clusters to integer cluster numbers.
      • leafTop

        protected IntegerArray leafTop
        Topmost merge of each leaf.
      • clusterMembers

        protected java.util.ArrayList<ModifiableDBIDs> clusterMembers
        Collected cluster members
    • Constructor Detail

      • Instance

        public Instance​(ClusterMergeHistory merges)
        Constructor.
        Parameters:
        merges - Cluster merge history
    • Method Detail

      • extractClusters

        public Clustering<DendrogramModel> extractClusters()
        Extract all clusters from the pi-lambda-representation.
        Returns:
        Hierarchical clustering
      • buildLeafClusters

        private void buildLeafClusters​(int split,
                                       FiniteProgress progress)
        Prepare the leaf clusters by executing the first (size - 1 - split) merges.
        Parameters:
        split - Splitting point
        progress - Progress for logging (may be null)
      • buildFlat

        private Clustering<DendrogramModel> buildFlat​(int split,
                                                      FiniteProgress progress)
        Build a flat clustering.
        Parameters:
        split - Splitting point
        progress - Progress for logging (may be null)
        Returns:
        Clustering
      • buildHierarchical

        private Clustering<DendrogramModel> buildHierarchical​(int split,
                                                              FiniteProgress progress)
        Build a hierarchical clustering.
        Parameters:
        split - Splitting point
        progress - Progress for logging (may be null)
        Returns:
        Clustering
      • findSplit

        protected abstract int findSplit()
        Find the splitting point in the merge history.
        Returns:
        Splitting point
      • makeCluster

        protected Cluster<DendrogramModel> makeCluster​(int seq,
                                                       DBIDs members)
        Make the cluster for the given object
        Parameters:
        seq - Cluster sequence number
        members - Member objects
        Returns:
        Cluster