From: cmzmasek@gmail.com Date: Wed, 20 Nov 2013 21:49:49 +0000 (+0000) Subject: inprogress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3766acb8ee5646371556c76cf657e669e7809dc2;p=jalview.git inprogress --- diff --git a/forester/java/src/org/forester/application/subtree_feature_count.java b/forester/java/src/org/forester/application/subtree_feature_count.java index 57d4620..da23024 100644 --- a/forester/java/src/org/forester/application/subtree_feature_count.java +++ b/forester/java/src/org/forester/application/subtree_feature_count.java @@ -125,23 +125,10 @@ public class subtree_feature_count { } } - private static PhylogenyNode moveUpOLd( final PhylogenyNode node, final double depth ) { - PhylogenyNode n = node; - double current_depth = 0.0; - while ( current_depth < depth ) { - current_depth += n.getDistanceToParent(); - if ( n.getParent() == null ) { - throw new IllegalArgumentException( "Depth " + depth + " is too large" ); - } - n = n.getParent(); - } - return n; - } - private static PhylogenyNode moveUp( final PhylogenyNode node, final double depth ) { PhylogenyNode n = node; PhylogenyNode prev = node; - while ( depth > n.calculateDistanceToRoot() ) { + while ( depth < n.calculateDistanceToRoot() ) { prev = n; n = n.getParent(); }