Package ch.usi.inf.sape.hac
Class ClusteringMatrixBuilder
java.lang.Object
ch.usi.inf.sape.hac.ClusteringMatrixBuilder
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionint[][]
void
merge
(int i, int j, double dissimilarity) Merge two clusters.
-
Constructor Details
-
ClusteringMatrixBuilder
public ClusteringMatrixBuilder(int nObservations)
-
-
Method Details
-
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()
-