gov.sandia.cognition.learning.algorithm.clustering.divergence
Class ClusterCompleteLinkDivergenceFunction<ClusterType extends Cluster<DataType>,DataType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.distance.DefaultDivergenceFunctionContainer<DataType,DataType>
          extended by gov.sandia.cognition.learning.algorithm.clustering.divergence.AbstractClusterToClusterDivergenceFunction<ClusterType,DataType>
              extended by gov.sandia.cognition.learning.algorithm.clustering.divergence.ClusterCompleteLinkDivergenceFunction<ClusterType,DataType>
Type Parameters:
ClusterType - type of Cluster<DataType> used in the learn() method
DataType - The algorithm operates on a Collection<DataType>, so DataType will be something like Vector or String
All Implemented Interfaces:
ClusterToClusterDivergenceFunction<ClusterType,DataType>, DivergenceFunctionContainer<DataType,DataType>, DivergenceFunction<ClusterType,ClusterType>, CloneableSerializable, Serializable, Cloneable

@CodeReview(reviewer="Kevin R. Dixon",
            date="2008-07-23",
            changesNeeded=false,
            comments={"Cleaned up javadoc a little bit with code annotations.","Otherwise, looks fine."})
public class ClusterCompleteLinkDivergenceFunction<ClusterType extends Cluster<DataType>,DataType>
extends AbstractClusterToClusterDivergenceFunction<ClusterType,DataType>

The ClusterCompleteLinkDivergenceFunction class implements the complete linkage distance metric between two clusters. That is, the value returned by the metric is the maximum distance between any point in the first cluster and any point in the second cluster.

Since:
1.0
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.learning.function.distance.DefaultDivergenceFunctionContainer
divergenceFunction
 
Constructor Summary
ClusterCompleteLinkDivergenceFunction()
          Creates a new instance of ClusterCompleteLinkDivergenceFunction.
ClusterCompleteLinkDivergenceFunction(DivergenceFunction<? super DataType,? super DataType> divergenceFunction)
          Creates a new instance of ClusterCompleteLinkDivergenceFunction using the given divergence function for elements.
 
Method Summary
 double evaluate(ClusterType from, ClusterType to)
          This method computes the complete link distance between the two given Clusters.
 
Methods inherited from class gov.sandia.cognition.learning.function.distance.DefaultDivergenceFunctionContainer
clone, getDivergenceFunction, setDivergenceFunction
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

ClusterCompleteLinkDivergenceFunction

public ClusterCompleteLinkDivergenceFunction()
Creates a new instance of ClusterCompleteLinkDivergenceFunction.


ClusterCompleteLinkDivergenceFunction

public ClusterCompleteLinkDivergenceFunction(DivergenceFunction<? super DataType,? super DataType> divergenceFunction)
Creates a new instance of ClusterCompleteLinkDivergenceFunction using the given divergence function for elements.

Parameters:
divergenceFunction - The divergence function for elements.
Method Detail

evaluate

public double evaluate(ClusterType from,
                       ClusterType to)
This method computes the complete link distance between the two given Clusters. The distance returned is the maximum distance between a member of the first cluster and a member of the second cluster.

Parameters:
from - The first Cluster.
to - The second Cluster.
Returns:
The complete link distance between the two given Clusters.