From 83193bc5c3e150dc7331b5b27a67cb5f9efb477c Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 30 Sep 2005 17:18:22 +0000 Subject: [PATCH] Restore file before eclipse changes --- src/jalview/analysis/NJTree.java | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/jalview/analysis/NJTree.java b/src/jalview/analysis/NJTree.java index 97b8519..6c239be 100755 --- a/src/jalview/analysis/NJTree.java +++ b/src/jalview/analysis/NJTree.java @@ -251,14 +251,14 @@ public class NJTree { while (noClus > 2) { - /* if (type.equals("NJ")) + if (type.equals("NJ")) { float mind = findMinNJDistance(); } else { float mind = findMinDistance(); - }*/ + } Cluster c = joinClusters(mini, minj); @@ -273,7 +273,7 @@ public class NJTree boolean onefound = false; int one = -1; - //int two = -1; + int two = -1; for (int i = 0; i < noseqs; i++) { @@ -281,7 +281,7 @@ public class NJTree { if (onefound == false) { - //two = i; + two = i; onefound = true; } else @@ -291,7 +291,7 @@ public class NJTree } } - // Cluster c = joinClusters(one, two); + Cluster c = joinClusters(one, two); top = (SequenceNode) (node.elementAt(one)); reCount(top); @@ -375,11 +375,11 @@ public class NJTree public void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj, float dist) { - //float ih = 0; - // float jh = 0; + float ih = 0; + float jh = 0; - //SequenceNode sni = tmpi; - //SequenceNode snj = tmpj; + SequenceNode sni = tmpi; + SequenceNode snj = tmpj; tmpi.dist = ((dist + ri) - rj) / 2; tmpj.dist = (dist - tmpi.dist); @@ -469,8 +469,8 @@ public class NJTree */ public void findClusterNJDistance(int i, int j) { - //int noi = ((Cluster) cluster.elementAt(i)).value.length; - //int noj = ((Cluster) cluster.elementAt(j)).value.length; + int noi = ((Cluster) cluster.elementAt(i)).value.length; + int noj = ((Cluster) cluster.elementAt(j)).value.length; // New distances from cluster to others float[] newdist = new float[noseqs]; @@ -1121,6 +1121,15 @@ public class NJTree } } + /** + * DOCUMENT ME! + * + * @param node DOCUMENT ME! + */ + public void setMaxDist(SequenceNode node) + { + this.maxdist = maxdist; + } /** * DOCUMENT ME! @@ -1164,3 +1173,4 @@ class Cluster this.value = value; } } + -- 1.7.10.2