X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FNJTree.java;fp=src%2Fjalview%2Fanalysis%2FNJTree.java;h=4ee0be936ef6ced3a6c46c8d3c820636e045ac2e;hb=b4228f9114855211ecb84c2670777e00947e8548;hp=fdadb13541c1bd90fa168882f2d8d076420cfef4;hpb=8717834368bd00d8adfa47ee099288acd34363ef;p=jalview.git diff --git a/src/jalview/analysis/NJTree.java b/src/jalview/analysis/NJTree.java index fdadb13..4ee0be9 100644 --- a/src/jalview/analysis/NJTree.java +++ b/src/jalview/analysis/NJTree.java @@ -308,8 +308,8 @@ public class NJTree { jalview.io.NewickFile fout = new jalview.io.NewickFile(getTopNode()); - return fout.print(isHasBootstrap(), isHasDistances(), - isHasRootDistance()); // output all data available for tree + return fout.print(hasBootstrap(), hasDistances(), + hasRootDistance()); // output all data available for tree } /** @@ -319,7 +319,7 @@ public class NJTree * @param list * Sequence set to be associated with tree nodes */ - public void UpdatePlaceHolders(List list) + public void updatePlaceHolders(List list) { Vector leaves = findLeaves(top); @@ -404,7 +404,7 @@ public class NJTree /** * DOCUMENT ME! */ - public void cluster() + void cluster() { while (noClus > 2) { @@ -466,7 +466,7 @@ public class NJTree * * @return DOCUMENT ME! */ - public Cluster joinClusters(int i, int j) + Cluster joinClusters(int i, int j) { double dist = distance.getValue(i, j); @@ -534,7 +534,7 @@ public class NJTree * @param dist * DOCUMENT ME! */ - public void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj, + void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj, double dist) { @@ -562,7 +562,7 @@ public class NJTree * @param dist * DOCUMENT ME! */ - public void findNewDistances(SequenceNode tmpi, SequenceNode tmpj, + void findNewDistances(SequenceNode tmpi, SequenceNode tmpj, double dist) { double ih = 0; @@ -595,7 +595,7 @@ public class NJTree * @param j * DOCUMENT ME! */ - public void findClusterDistance(int i, int j) + void findClusterDistance(int i, int j) { int noi = cluster.elementAt(i).value.length; int noj = cluster.elementAt(j).value.length; @@ -636,7 +636,7 @@ public class NJTree * @param j * DOCUMENT ME! */ - public void findClusterNJDistance(int i, int j) + void findClusterNJDistance(int i, int j) { // New distances from cluster to others @@ -676,7 +676,7 @@ public class NJTree * * @return DOCUMENT ME! */ - public double findr(int i, int j) + double findr(int i, int j) { double tmp = 1; @@ -702,7 +702,7 @@ public class NJTree * * @return DOCUMENT ME! */ - public double findMinNJDistance() + double findMinNJDistance() { double min = Double.MAX_VALUE; @@ -735,7 +735,7 @@ public class NJTree * * @return DOCUMENT ME! */ - public double findMinDistance() + double findMinDistance() { double min = Double.MAX_VALUE; @@ -764,7 +764,7 @@ public class NJTree /** * DOCUMENT ME! */ - public void makeLeaves() + void makeLeaves() { cluster = new Vector(); @@ -838,54 +838,12 @@ public class NJTree } /** - * Find the leaf node with a particular ycount - * - * @param nd - * initial point on tree to search from - * @param count - * value to search for - * - * @return null or the node with ycound=count - */ - public Object findLeaf(SequenceNode nd, int count) - { - found = _findLeaf(nd, count); - - return found; - } - - /* - * #see findLeaf(SequenceNode node, count) - */ - public Object _findLeaf(SequenceNode nd, int count) - { - if (nd == null) - { - return null; - } - - if (nd.ycount == count) - { - found = nd.element(); - - return found; - } - else - { - _findLeaf((SequenceNode) nd.left(), count); - _findLeaf((SequenceNode) nd.right(), count); - } - - return found; - } - - /** * printNode is mainly for debugging purposes. * * @param nd * SequenceNode */ - public void printNode(SequenceNode nd) + void printNode(SequenceNode nd) { if (nd == null) { @@ -912,7 +870,7 @@ public class NJTree * @param nd * DOCUMENT ME! */ - public void findMaxDist(SequenceNode nd) + void findMaxDist(SequenceNode nd) { if (nd == null) { @@ -1034,8 +992,9 @@ public class NJTree * * @return DOCUMENT ME! */ - public SequenceNode reRoot() + SequenceNode reRoot() { + // TODO not used - remove? if (maxdist != null) { ycount = 0; @@ -1109,7 +1068,7 @@ public class NJTree * @param nd * DOCUMENT ME! */ - public void printN(SequenceNode nd) + void printN(SequenceNode nd) { if (nd == null) { @@ -1152,7 +1111,7 @@ public class NJTree * @param nd * DOCUMENT ME! */ - public void _reCount(SequenceNode nd) + void _reCount(SequenceNode nd) { // if (_lycount<_lylimit) // { @@ -1211,7 +1170,7 @@ public class NJTree * @param dir * DOCUMENT ME! */ - public void changeDirection(SequenceNode nd, SequenceNode dir) + void changeDirection(SequenceNode nd, SequenceNode dir) { if (nd == null) { @@ -1290,7 +1249,7 @@ public class NJTree * * @return true if tree has real distances */ - public boolean isHasDistances() + public boolean hasDistances() { return hasDistances; } @@ -1299,12 +1258,12 @@ public class NJTree * * @return true if tree has real bootstrap values */ - public boolean isHasBootstrap() + public boolean hasBootstrap() { return hasBootstrap; } - public boolean isHasRootDistance() + public boolean hasRootDistance() { return hasRootDistance; }