From: Jim Procter Date: Tue, 2 May 2017 13:16:25 +0000 (+0100) Subject: JAL-2424 update assert to correct width for normalising similarity scores X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7b38a52bf6f0bc32e5d91f0716ad435b7027933b;p=jalview.git JAL-2424 update assert to correct width for normalising similarity scores --- diff --git a/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java b/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java index f52ede9..6df8a66 100644 --- a/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java +++ b/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java @@ -294,14 +294,13 @@ public class FeatureDistanceModelTest /* * include gaps * score = 3 + 3 + 0 + 2 + 3 + 2 = 13/6 - // FIXME out by 1 error in cpwidth JAL-2424 - dividing by 7 */ SimilarityParamsI params = new SimilarityParams(true, true, true, true); MatrixI distances = sm.findDistances(view, params); assertEquals(distances.getValue(0, 0), 0d); assertEquals(distances.getValue(1, 1), 0d); - assertEquals(distances.getValue(0, 1), 13d / 7); // should be 13d/6 - assertEquals(distances.getValue(1, 0), 13d / 7); + assertEquals(distances.getValue(0, 1), 13d / 6); // should be 13d/6 + assertEquals(distances.getValue(1, 0), 13d / 6); /* * exclude gaps @@ -310,7 +309,7 @@ public class FeatureDistanceModelTest */ params = new SimilarityParams(true, true, false, true); distances = sm.findDistances(view, params); - assertEquals(distances.getValue(0, 1), 6d / 7);// should be 6d/6 + assertEquals(distances.getValue(0, 1), 6d / 6);// should be 6d/6 } /**