View source: R/totIntPathLen.R
| totIntPathLen | R Documentation |
This function calculates the total internal path length TIP(T) for a given rooted
tree T. The tree must not necessarily be binary. TIP(T) is defined as
TIP(T)=\sum_{x\in V_{in}(T)} \delta(x)
in
which V_{in}(T) denotes the set of inner vertices of T, and \delta(x)
denotes the depth of the vertex x. The total internal path length is an
imbalance index.
For details on the total internal path length, see
also Chapter 23 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_23).
totIntPathLen(tree)
tree |
A rooted tree in phylo format. |
totIntPathLen returns the total internal path length of the given tree.
Luise Kuehn
D. E. Knuth. The art of computer programming: fundamental algorithms, volume 1. Addison-Wesley, Reading, Mass, 3rd edition, 1997. ISBN 9780201896831.
tree <- ape::read.tree(text="((((,),),(,)),(((,,),),(,)));")
totIntPathLen(tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.