TreeTools (version 1.4.1)

TreesMatchingTree: Number of trees containing a tree

Description

TreesMatchingTree() calculates the number of unrooted binary trees that are consistent with a tree topology on the same leaves.

Usage

TreesMatchingTree(tree)

LnTreesMatchingTree(tree)

Log2TreesMatchingTree(tree)

Arguments

tree

A tree of class phylo.

Value

TreesMatchingTree() returns a numeric specifying the number of unrooted binary trees that contain all the edges present in the input tree.

LnTreesMatchingTree() gives the natural logarithm of this number.

Details

Remember to unroot a tree first if the position of its root is arbitrary.

See Also

Other tree information functions: CladisticInfo(), NRooted()

Examples

Run this code
# NOT RUN {
partiallyResolvedTree <- CollapseNode(BalancedTree(8), 12:15)
TreesMatchingTree(partiallyResolvedTree)
LnTreesMatchingTree(partiallyResolvedTree)

# Number of rooted trees:
rootedTree <- AddTip(partiallyResolvedTree, where = 0)
TreesMatchingTree(partiallyResolvedTree)
# }

Run the code above in your browser using DataLab