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

Method getHeight

src/figtree/treeviewer/ReRootedTree.java:226–230  ·  view source on GitHub ↗

@param node the node whose height is being requested. @return the height of the given node. The height will be less than the parent's height and greater than it children's heights.

(Node node)

Source from the content-addressed store, hash-verified

224 * less than the parent's height and greater than it children's heights.
225 */
226 public double getHeight(Node node) {
227 if (!hasHeights) throw new IllegalArgumentException("This tree has no node heights");
228 if (!heightsKnown) calculateNodeHeights();
229 return ((ReRootedNode)node).getHeight();
230 }
231
232 /**
233 * @return Whether this tree has branch lengths available

Callers 4

getEdgeLengthMethod · 0.45
calculateNodeHeightsMethod · 0.45
nodeHeightsToLengthsMethod · 0.45

Calls 1

calculateNodeHeightsMethod · 0.95

Tested by

no test coverage detected