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