symNodesI {treebalance} | R Documentation |
Calculation of the symmetry nodes index for rooted binary trees
Description
This function calculates the symmetry nodes index SNI(T)
for a given rooted
binary tree T
. SNI(T)
is defined as the number of inner vertices v
that are not
symmetry nodes, i.e. the two pending subtrees rooted at the children of v
do not
have the same tree shape.
For n=1
the function returns SNI(T)=0
and a warning.
For details on the symmetry nodes index, see
also Chapter 18 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_18).
Usage
symNodesI(tree)
Arguments
tree |
A rooted binary tree in phylo format. |
Value
symNodesI
returns the symmetry nodes index of the given tree.
Author(s)
Sophie Kersting
References
S. J. Kersting, M. Fischer. Measuring tree balance using symmetry nodes — A new balance index and its extremal properties. Mathematical Biosciences, page 108690, 2021. ISSN 0025-5564. doi:https://doi.org/10.1016/j.mbs.2021.108690
Examples
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
symNodesI(tree)