@Test public void testFindMaximumDistanceToLeaf() { Node root = new Node(); Node a = new Node(); a.setBranchLength(1.0); Node b = new Node(); b.setBranchLength(2.0); Node c = new Node(); c.setBranchLength(1.0); Node d = new Node(); d.setBranchLength(3.0); root.addChild(a); root.addChild(b); b.addChild(c); b.addChild(d); double distance=root.findMaximumDistanceToLeaf(); assertTrue(5.0==distance); }
@Override public double findMaximumDistanceToLeaf() { return this.findMaximumDistanceToLeaf(0.0); }
Node implements INode, IsSerializable { @Override public double findMaximumDistanceToLeaf() { return this.findMaximumDistanceToLeaf(0.0); } }
Node implements INode, IsSerializable { @Override public double findMaximumDistanceToLeaf() { return this.findMaximumDistanceToLeaf(0.0); } Node(int id, String label);  Node(Node[] children);  Node(); }
Node implements INode, IsSerializable { @Override public double findMaximumDistanceToLeaf() { return this.findMaximumDistanceToLeaf(0.0); } Node(int id, String label);  Node(Node[] children);  Node(); @Override String findLabelOfFirstLeafNode(); @Override int findMaximumDepthToLeaf(); @Override Node getChild(int index); void addChild(Node node); @Override Node[] getChildren(); @Override int getId(); @Override String getLabel(); @Override int getNumberOfChildren(); @Override int getNumberOfLeafNodes(); @Override int getNumberOfNodes(); @Override Boolean isLeaf(); @Override void setId(int id); @Override void setLabel(String label); @Override void sortChildrenBy(Comparator<INode> comparator); @Override boolean equals(Object obj); boolean shallowEquals(Node obj); void setChildren(Node[] children); void addNodeListener(NodeListener listener); void removeNodeListener(NodeListener listener); void removeNodeListenerFromSubtree(NodeListener listener); @Override String toString(); @Override Double getBranchLength(); @Override void setBranchLength(Double branchLength); @Override double findMaximumDistanceToLeaf(); @Override String getMetaDataString(); @Override INode mrca(Set<INode> nodes); }
Node implements INode, IsSerializable { @Override public double findMaximumDistanceToLeaf() { return this.findMaximumDistanceToLeaf(0.0); } Node(int id, String label);  Node(Node[] children);  Node(); @Override String findLabelOfFirstLeafNode(); @Override int findMaximumDepthToLeaf(); @Override Node getChild(int index); void addChild(Node node); @Override Node[] getChildren(); @Override int getId(); @Override String getLabel(); @Override int getNumberOfChildren(); @Override int getNumberOfLeafNodes(); @Override int getNumberOfNodes(); @Override Boolean isLeaf(); @Override void setId(int id); @Override void setLabel(String label); @Override void sortChildrenBy(Comparator<INode> comparator); @Override boolean equals(Object obj); boolean shallowEquals(Node obj); void setChildren(Node[] children); void addNodeListener(NodeListener listener); void removeNodeListener(NodeListener listener); void removeNodeListenerFromSubtree(NodeListener listener); @Override String toString(); @Override Double getBranchLength(); @Override void setBranchLength(Double branchLength); @Override double findMaximumDistanceToLeaf(); @Override String getMetaDataString(); @Override INode mrca(Set<INode> nodes);  }