@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)
| 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 |
no test coverage detected