Package ch.usi.inf.sape.hac
Class ClusteringMatrixBuilder
- java.lang.Object
-
- ch.usi.inf.sape.hac.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.
-
-
Constructor Summary
Constructors Constructor Description ClusteringMatrixBuilder(int nObservations)
-
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.
-
-
-
Method Detail
-
merge
public void merge(int i, int j, double dissimilarity)
Description copied from interface:ClusteringBuilder
Merge two clusters.- Specified by:
merge
in interfaceClusteringBuilder
- Parameters:
i
- the smaller of the two cluster indicesj
- the larger of the two cluster indicesdissimilarity
- between the two merged clusters
-
getClustering
public int[][] getClustering()
-
-