From c6977851625f96831a95b45901aa1d84bd7774fe Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 6 Jun 2022 12:22:03 +0100 Subject: [PATCH] JAL-4023 store distances as doubles --- src/jalview/datamodel/SequenceNode.java | 4 ++-- src/jalview/io/NewickFile.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jalview/datamodel/SequenceNode.java b/src/jalview/datamodel/SequenceNode.java index fa12419..0a694c2 100755 --- a/src/jalview/datamodel/SequenceNode.java +++ b/src/jalview/datamodel/SequenceNode.java @@ -70,7 +70,7 @@ public class SequenceNode extends BinaryNode * @param name * DOCUMENT ME! */ - public SequenceNode(Object val, SequenceNode parent, float dist, + public SequenceNode(Object val, SequenceNode parent, double dist, String name) { super(val, parent, name); @@ -94,7 +94,7 @@ public class SequenceNode extends BinaryNode * DOCUMENT ME! */ public SequenceNode(Object val, SequenceNode parent, String name, - float dist, int bootstrap, boolean dummy) + double dist, int bootstrap, boolean dummy) { super(val, parent, name); this.dist = dist; diff --git a/src/jalview/io/NewickFile.java b/src/jalview/io/NewickFile.java index 4a30d73..027390a 100755 --- a/src/jalview/io/NewickFile.java +++ b/src/jalview/io/NewickFile.java @@ -286,11 +286,11 @@ public class NewickFile extends FileParse String nodename = null; String commentString2 = null; // comments after simple node props - float DefDistance = (float) 0.001; // @param Default distance for a node - + double DefDistance = (float) 0.001; // @param Default distance for a node - // very very small int DefBootstrap = -1; // @param Default bootstrap for a node - float distance = DefDistance; + double distance = DefDistance; int bootstrap = DefBootstrap; boolean ascending = false; // flag indicating that we are leaving the @@ -487,7 +487,7 @@ public class NewickFile extends FileParse { try { - distance = (Float.valueOf(ndist.stringMatched(1))).floatValue(); + distance = (Double.valueOf(ndist.stringMatched(1))).floatValue(); HasDistances = true; nodehasdistance = true; } catch (Exception e) -- 1.7.10.2