X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fphylogeny%2FPhylogenyNode.java;h=819ba7a6b21a62aa805a22afed295f7b1f7da972;hb=caebe5e946fc15f9042dc70cac985910c6205e3c;hp=ba357c7aa32770effc5da6a67a1599a39f4d7d04;hpb=14f8357072fabd3b089bbe8c5eee7ce2a5be2c6e;p=jalview.git diff --git a/forester/java/src/org/forester/phylogeny/PhylogenyNode.java b/forester/java/src/org/forester/phylogeny/PhylogenyNode.java index ba357c7..819ba7a 100644 --- a/forester/java/src/org/forester/phylogeny/PhylogenyNode.java +++ b/forester/java/src/org/forester/phylogeny/PhylogenyNode.java @@ -47,8 +47,11 @@ import org.forester.util.ForesterUtil; * to unexpected behavior. * */ -public final class PhylogenyNode implements PhylogenyNodeI, Comparable { +public final class PhylogenyNode implements Comparable { + public enum NH_CONVERSION_SUPPORT_VALUE_STYLE { + NONE, IN_SQUARE_BRACKETS, AS_INTERNAL_NODE_NAMES; + } private static int _node_count = 0; private byte _indicator; private int _id; @@ -88,9 +91,8 @@ public final class PhylogenyNode implements PhylogenyNodeI, Comparable getAllDescendants() { - return _descendants; } - - + final public int getNumberOfDescendants() { if ( _descendants == null ) { return 0; @@ -740,6 +733,28 @@ public final class PhylogenyNode implements PhylogenyNodeI, Comparable 0.0 ) { + d += n._distance_parent; + } + n = n._parent; + } + return d; + } + /** * Checks whether this PhylogenyNode is a root. * @@ -843,7 +858,6 @@ public final class PhylogenyNode implements PhylogenyNodeI, Comparable