totIntPathLen {treebalance} | R Documentation |
Calculation of the total internal path length for rooted trees
Description
This function calculates the total internal path length for a given rooted
tree
. The tree must not necessarily be binary.
is defined as
in
which denotes the set of inner vertices of
, and
denotes the depth of the vertex
. 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)
Arguments
tree |
A rooted tree in phylo format. |
Value
totIntPathLen
returns the total internal path length of the given tree.
Author(s)
Luise Kuehn
References
D. E. Knuth. The art of computer programming: fundamental algorithms, volume 1. Addison-Wesley, Reading, Mass, 3rd edition, 1997. ISBN 9780201896831.
Examples
tree <- ape::read.tree(text="((((,),),(,)),(((,,),),(,)));")
totIntPathLen(tree)
[Package treebalance version 1.2.0 Index]