mWovermD: Calculation of the maximum width over maximum depth of the...

View source: R/mWovermD.R

mWovermDR Documentation

Calculation of the maximum width over maximum depth of the tree

Description

This function calculates the maximum width over maximum depth mWovermD(T) for a given rooted tree T. The tree must not necessarily be binary. For n>1, mWovermD(T) is defined as

mWovermD(T)=maxWidth(T) / h(T)

in which h(T) denotes the height of the tree T, which is the same as the maximum depth of any leaf in the tree, and maxWidth(T) denotes the maximum width of the tree T. The maximum width over maximum depth is a balance index.

For details on the maximum width over maximum depth, see also Chapter 23 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_23).

Usage

mWovermD(tree)

Arguments

tree

A rooted tree in phylo format.

Value

mWovermD returns the maximum width over maximum depth of a tree.

Author(s)

Luise Kuehn

References

C. Colijn and J. Gardy. Phylogenetic tree shapes resolve disease transmission patterns. Evolution, Medicine, and Public Health, 2014(1):96–108, 2014. doi: 10.1093/emph/eou018.

Examples

tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
mWovermD(tree)
tree <- ape::read.tree(text="((,),((((,),),),(,)));")
mWovermD(tree)


treebalance documentation built on May 29, 2024, 1:15 a.m.