Return the distance between self and other
This method can be used to compute the distances between two tips, however, it is not optimized for computing pairwise tip distances.
Parameters: | other : TreeNode
|
---|---|
Returns: | float
|
Raises: | NoLengthError
|
Examples
>>> from skbio.core.tree import TreeNode
>>> tree = TreeNode.from_newick("((a:1,b:2)c:3,(d:4,e:5)f:6)root;")
>>> tip_a = tree.find('a')
>>> tip_d = tree.find('d')
>>> tip_a.distance(tip_d)
14.0