From 948828a5fed141e2ed319586687b80b6d0298268 Mon Sep 17 00:00:00 2001 From: James Procter Date: Mon, 27 Feb 2023 17:26:46 +0000 Subject: [PATCH] JAL-4134 compute normalised dot product for contact matrix similarities --- src/jalview/analysis/AverageDistanceEngine.java | 25 ++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/jalview/analysis/AverageDistanceEngine.java b/src/jalview/analysis/AverageDistanceEngine.java index 90a96e0..ed6f861 100644 --- a/src/jalview/analysis/AverageDistanceEngine.java +++ b/src/jalview/analysis/AverageDistanceEngine.java @@ -50,11 +50,20 @@ public class AverageDistanceEngine extends TreeEngine this.av =av; this.aa = aa; this.cm=cm; + calculate(cm); + + } + public void calculate(ContactMatrixI cm) + { + this.cm = cm; node = new Vector(); clusters = new Vector(); distances = new Matrix(new double[cm.getWidth()][cm.getWidth()]); noseqs=cm.getWidth(); done = new BitSet(); + double moduli[]=new double[cm.getWidth()]; + + for (int i=0;i