From 884ceb8d615494bc75a7e54a19badbec008e483d Mon Sep 17 00:00:00 2001 From: Devin Lange Date: Tue, 15 Aug 2023 14:41:37 -0600 Subject: [PATCH] add larger distance value test --- test/hcluster-test.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test/hcluster-test.js b/test/hcluster-test.js index 69c0f6c..c7952ef 100644 --- a/test/hcluster-test.js +++ b/test/hcluster-test.js @@ -32,6 +32,33 @@ suite.addBatch({ }, }, average_3_values: { + simple() { + const hcluster = reorder + .hcluster() + .distance(reorder.distance.manhattan) + .linkage('average'); + checkDistanceValues(hcluster(VECTORS_6x1), [1, 2, 4.5, 5, 48.75]); + }, + }, + single_6_values: { + simple() { + const hcluster = reorder + .hcluster() + .distance(reorder.distance.manhattan) + .linkage('single'); + checkDistanceValues(hcluster(VECTORS_6x1), [1, 2, 3, 5, 43]); + }, + }, + complete_6_values: { + simple() { + const hcluster = reorder + .hcluster() + .distance(reorder.distance.manhattan) + .linkage('complete'); + checkDistanceValues(hcluster(VECTORS_6x1), [1, 2, 5, 6, 54]); + }, + }, + average_6_values: { simple() { const hcluster = reorder .hcluster()