B2G/gecko/toolkit/components/places/ClusterLib.js
/**
 * Class that can run the hierarchical clustering algorithm with the given
 * parameters.
 *
 * @param distance
 *        Function that should return the distance between two items.
 *        Defaults to clusterlib.euclidean_distance.
 * @param merge
 *        Function that should take in two items and return a merged one.
 *        Defaults to clusterlib.average_linkage.
 * @param threshold
 *        The maximum distance between two items for which their clusters
 *        can be merged.
 */
Class that can run the hierarchical clustering algorithm with the given
parameters.

@param distance
Function that should return the distance between two items.
Class that can run the hierarchical clustering algorithm with the given parameters . @param distance Function that should return the distance between two items .
function HierarchicalClustering(distance, merge, threshold) {
  this.distance = distance || clusterlib.euclidean_distance;
  this.merge = merge || clusterlib.average_linkage;
  this.threshold = threshold == undefined ? Infinity : threshold;
}
function HierarchicalClustering ( distance , merge , threshold ) { this . distance = distance || clusterlib . euclidean_distance ; this . merge = merge || clusterlib . average_linkage ; this . threshold = threshold == undefined ? Infinity : threshold ; }
Class that can run the hierarchical clustering algorithm with the given
 parameters.
Class that can run the hierarchical clustering algorithm with the given parameters .