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

Method nodeHeightsToLengths

src/figtree/treeviewer/ReRootedTree.java:560–568  ·  view source on GitHub ↗

Calculate branch lengths from the current node heights.

(ReRootedNode node, double height)

Source from the content-addressed store, hash-verified

558 * Calculate branch lengths from the current node heights.
559 */
560 private void nodeHeightsToLengths(ReRootedNode node, double height) {
561 final double h = node.getHeight();
562 node.setLength(h >= 0 ? height - h : 1);
563
564 for (Node child : node.getChildren()) {
565 nodeHeightsToLengths((ReRootedNode)child, node.getHeight());
566 }
567
568 }
569
570 public boolean conceptuallyUnrooted() {
571 return false;

Callers 1

Calls 3

getHeightMethod · 0.45
setLengthMethod · 0.45
getChildrenMethod · 0.45

Tested by

no test coverage detected