diff --git a/lib/hcluster.js b/lib/hcluster.js index 7e4fdac..d4ffc19 100644 --- a/lib/hcluster.js +++ b/lib/hcluster.js @@ -80,7 +80,8 @@ HierarchicalClustering.prototype = { left: c1, right: c2, key: c1.key, - size: c1.size + c2.size + size: c1.size + c2.size, + distance: min }; this.clusters[c1.index] = merged;