com.chemaxon.clustering.wards
Class LanceWilliamsMerges.SingleLinkage
Object
com.chemaxon.clustering.wards.LanceWilliamsMerges.SingleLinkage
- All Implemented Interfaces:
- LanceWilliamsMerge
- Enclosing class:
- LanceWilliamsMerges
public static class LanceWilliamsMerges.SingleLinkage
- extends Object
- implements LanceWilliamsMerge
Single linkage clustering also known as nearest neighbor clustering.
- See Also:
- http://en.wikipedia.org/wiki/Single-linkage_clustering
Method Summary |
double |
dijk(int ni,
int nj,
int nk,
double dij,
double dik,
double djk)
Returns the distance of cluster k and the cluster resulted from merging cluster i and j. |
String |
toString()
|
LanceWilliamsMerges.SingleLinkage
public LanceWilliamsMerges.SingleLinkage()
dijk
public double dijk(int ni,
int nj,
int nk,
double dij,
double dik,
double djk)
- Description copied from interface:
LanceWilliamsMerge
- Returns the distance of cluster k and the cluster resulted from merging cluster i and j.
- Specified by:
dijk
in interface LanceWilliamsMerge
- Parameters:
ni
- Size of cluster i to be mergednj
- Size of cluster j to be mergednk
- Size of cluster kdij
- Distance of clusters i and jdik
- Distance of clusters i and kdjk
- Distance of clusters j and k
- Returns:
- Distance of cluster k and cluster i-j merged
toString
public String toString()
- Overrides:
toString
in class Object