* SimilarityFunction} will be used to build a symmetric adjacency matrix
* and the {@link ClusterLink} will determine how to udpate similarities
* between newly nerged clusters.
*/
public Assignments cluster(Matrix m, int numClusters, Properties props) {
Matrix adj = new SymmetricMatrix(m.rows(), m.rows());
for (int r = 0; r < m.rows(); ++r) {
DoubleVector v = m.getRowVector(r);
for (int c = r+1; c < m.rows(); ++c)
adj.set(r,c, simFunc.sim(v, m.getRowVector(c)));
}
return clusterAdjacencyMatrix(adj, method, numClusters);
}