Skip to content

v2.2.0

Latest

Choose a tag to compare

@ms609 ms609 released this 20 Mar 06:30
· 11 commits to main since this release

New functionality

  • EdgeRatio() reports the ratio of external:internal edges.
  • SplitInformation() supports Splits and phylo objects.
  • sort and order support Splits objects.
  • SplitFrequency(reference = NULL) returns frequency of all splits.
  • as.TreeNumber() now supports trees with up to 51 leaves (previously 19).
    Trees with 20–51 leaves have more than 2^64 distinct topologies, so their TreeNumber is stored as a decimal character string rather than integer64. The 19-leaf limit for integer64-backed storage (and as.MixedBase() round-trips) is unchanged.
  • as.TreeNumber() no longer warns for trees with 20–44 leaves.
  • inst/include/TreeTools/tree_number.h added to support downstream packages (e.g. TBRDist) via LinkingTo: TreeTools. Provides 256-bit tree number encoding/decoding supporting up to 51 leaves, extended from the 44-leaf limit of the previous uint64_t-based implementation.

Performance

  • SplitFrequency(reference = NULL): split normalization moved to C++; internal split de-duplication uses hash map instead of ordered map.
  • NodeDepth() for unrooted trees rewritten as O(n) two-pass C++ algorithm, replacing iterative R while-loop.
  • duplicated.Splits() uses hash-based O(n) de-duplication, replacing O(n²) pairwise comparison.
  • RenumberTips.multiPhylo() applies tip permutation in a single C++ call, avoiding per-tree overhead.

Fixes

  • PhyDatToMatrix() no longer crashes on zero-character phyDat objects (e.g. from a star tree); returns a 0-column matrix with correct row names.
  • AddUnconstrained() handles zero-character phyDat input gracefully.

Dependencies

  • RCurl moved from Imports to Suggests; ReadMrBayesTrees() uses RCurl::url.exists() when available, falling back to base R url() for URL checks.