public class SingleLinkageClusterer extends Object
Constructor and Description |
---|
SingleLinkageClusterer(double[][] matrix,
boolean isScoreMatrix)
Constructs a new SingleLinkageClusterer
Subsequently use
getDendrogram() to get the full tree
or getClusters(double) to get the clusters at a certain cutoff in the tree
Please note that the matrix will be altered during the clustering procedure. |
Modifier and Type | Method and Description |
---|---|
Map<Integer,Set<Integer>> |
getClusters(double cutoff)
Get the clusters by cutting the dendrogram at given cutoff
|
org.biojava.nbio.core.util.SingleLinkageClusterer.LinkedPair[] |
getDendrogram()
Get the full dendrogram (size n-1) result of the hierarchical clustering
|
public SingleLinkageClusterer(double[][] matrix, boolean isScoreMatrix)
getDendrogram()
to get the full tree
or getClusters(double)
to get the clusters at a certain cutoff in the tree
Please note that the matrix will be altered during the clustering procedure. A copy must be
made before by the user if needing to use the original matrix further.matrix
- the distance matrix with distance values in j>i half, all other values will be ignoredisScoreMatrix
- if false the matrix will be considered a distance matrix: lower values (distances) mean closer objects,
if true the matrix will be considered a score matrix: larger values (scores) mean closer objectsIllegalArgumentException
- if matrix not squareCopyright © 2000–2016 BioJava. All rights reserved.