totIntPathLen: Calculation of the total internal path length for rooted trees
Description
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).
Usage
totIntPathLen(tree)
Value
totIntPathLen returns the total internal path length of the given tree.
Arguments
tree
A rooted tree in phylo format.
Author
Luise Kuehn
References
D. E. Knuth. The art of computer programming: fundamental algorithms, volume 1. Addison-Wesley, Reading, Mass, 3rd edition, 1997. ISBN 9780201896831.