Class ClusteringMatrixBuilder

  • All Implemented Interfaces:
    ClusteringBuilder

    public final class ClusteringMatrixBuilder
    extends java.lang.Object
    implements ClusteringBuilder
    A ClusteringMatrixBuilder builds a matrix in which each row represents a step in the clustering and each column represents an observation or cluster. In the first step (row 0), each column represents an observation. In the last step, each column refers to the same cluster. Each step represents a copy of the step above, with two clusters merged into one.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int[][] getClustering()  
      void merge​(int i, int j, double dissimilarity)
      Merge two clusters.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClusteringMatrixBuilder

        public ClusteringMatrixBuilder​(int nObservations)
    • Method Detail

      • merge

        public void merge​(int i,
                          int j,
                          double dissimilarity)
        Description copied from interface: ClusteringBuilder
        Merge two clusters.
        Specified by:
        merge in interface ClusteringBuilder
        Parameters:
        i - the smaller of the two cluster indices
        j - the larger of the two cluster indices
        dissimilarity - between the two merged clusters
      • getClustering

        public int[][] getClustering()