at.tuwien.ifs.somtoolbox.visualization.clustering
Class CompleteLinkageTreeBuilder

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.visualization.clustering.TreeBuilder
      extended by at.tuwien.ifs.somtoolbox.visualization.clustering.CompleteLinkageTreeBuilder

public class CompleteLinkageTreeBuilder
extends TreeBuilder

Complete Linkage Clustering Algorithm. This class is not compatible with mnemonic SOMs (and probably also not compatible with hierarchical SOMs) The updating uf the distances can probabla be optimised (see WardsLinkageTreeBuilderAll - lazyUpdate)

Version:
$Id: CompleteLinkageTreeBuilder.java 3938 2010-11-17 15:15:25Z mayer $
Author:
Angela Roiger

Field Summary
 
Fields inherited from class at.tuwien.ifs.somtoolbox.visualization.clustering.TreeBuilder
level, monitor, progress, progressWriter
 
Constructor Summary
CompleteLinkageTreeBuilder()
           
 
Method Summary
private  TreeSet<NodeDistance> calculateAllDistances(GeneralUnitPNode[][] units)
          Calculates all distances between all units.
 ClusteringTree createTree(GeneralUnitPNode[][] units)
          Calculation of the Clustering.
 String getClusteringAlgName()
           
 
Methods inherited from class at.tuwien.ifs.somtoolbox.visualization.clustering.TreeBuilder
allowAborting, finishMonitor, incrementMonitor, resetMonitor, setMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompleteLinkageTreeBuilder

public CompleteLinkageTreeBuilder()
Method Detail

createTree

public ClusteringTree createTree(GeneralUnitPNode[][] units)
                          throws ClusteringAbortedException
Calculation of the Clustering. This code is only compatible with rectangular, non hierarchical SOMs!

Specified by:
createTree in class TreeBuilder
Parameters:
units - the GeneralUnitPNode Array containing all the units of the SOM
Returns:
the ClusteringTree (i.e. the top node of the tree)
Throws:
ClusteringAbortedException

calculateAllDistances

private TreeSet<NodeDistance> calculateAllDistances(GeneralUnitPNode[][] units)
                                             throws ClusteringAbortedException
Calculates all distances between all units.

Parameters:
units - A GeneralUnitPNode[][] containing the Units of the som
Returns:
TreeSet of NodeDistances containing the distances between the units starting with the smallest.
Throws:
ClusteringAbortedException - when the clustering was aborted.

getClusteringAlgName

public String getClusteringAlgName()
Specified by:
getClusteringAlgName in class TreeBuilder