MCPcopy Create free account
hub / github.com/rambaut/figtree / getLength

Method getLength

src/figtree/treeviewer/ReRootedTree.java:243–247  ·  view source on GitHub ↗

@param node the node whose branch length (to its parent) is being requested. @return the length of the branch to the parent node (0.0 if the node is the root).

(Node node)

Source from the content-addressed store, hash-verified

241 * @return the length of the branch to the parent node (0.0 if the node is the root).
242 */
243 public double getLength(Node node) {
244 if (!hasLengths) throw new IllegalArgumentException("This tree has no branch lengths");
245 if (!lengthsKnown) calculateBranchLengths();
246 return ((ReRootedNode)node).getLength();
247 }
248
249 /**
250 * @param node the node whose parent is requested

Callers 2

getEdgeLengthMethod · 0.45
nodeLengthsToHeightsMethod · 0.45

Calls 1

Tested by

no test coverage detected