TreeTools (version 0.1.3)

NRooted: Number of rooted/unrooted trees

Description

These functions return the number of rooted or unrooted trees consistent with a given pattern of splits.

Usage

NRooted(tips)

NUnrooted(tips)

LnUnrooted(tips)

LnUnrooted.int(tips)

LnRooted(tips)

LnRooted.int(tips)

LnUnrootedSplits(splits)

NUnrootedSplits(splits)

LnUnrootedMult(splits)

NUnrootedMult(splits)

Arguments

tips

Integer specifying the number of tips.

splits

Integer vector listing the number of taxa in each tree bipartition.

Functions

  • NUnrooted: Number of unrooted trees

  • LnUnrooted: Log Number of unrooted trees

  • LnUnrooted.int: Log Number of unrooted trees (as integer)

  • LnRooted: Log Number of rooted trees

  • LnRooted.int: Log Number of rooted trees (as integer)

  • LnUnrootedSplits: Log number of unrooted trees

  • NUnrootedSplits: Number of unrooted trees

  • LnUnrootedMult: Log unrooted mult

  • NUnrootedMult: Number of unrooted trees (mult)

Details

Functions starting N return the number of rooted or unrooted trees, functions starting Ln provide the natural logarithm of this number. Calculations follow Carter et al. 1990, Theorem 2.

References

Carter1990TreeTools

Examples

Run this code
# NOT RUN {
  NRooted(10)
  NUnrooted(10)
  LnRooted(10)
  LnUnrooted(10)
  # Number of trees consistent with a character whose states are
  # 00000 11111 222
  NUnrootedMult(c(5,5,3))

# }

Run the code above in your browser using DataLab