From 3766acb8ee5646371556c76cf657e669e7809dc2 Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Wed, 20 Nov 2013 21:49:49 +0000 Subject: [PATCH] inprogress --- .../org/forester/application/subtree_feature_count.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) 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(); } -- 1.7.10.2