Before starting work in this directory, read
../AGENTS.mdfor multi-agent coordination rules, build/test infrastructure, GHA workflows, and worktree discipline. That file is the authoritative reference for all cross-package agent operations.
TreeTools underpins a hierarchy of packages, all with the same maintainer; these draw in C++ headers and many exported R functions.
These are likely checked out locally in sister directories to this one.
PlotTools TreeTools (foundation-level) TreeDist TreeSearch ("top of the stack")
Quartet Rogue
Ternary
Each package contains CONTRIBUTING.md files that detail code style conventions.
Trees are represented ape's as.phylo, with edges listed as a two-column matrix (parent node ID, child ID). My Preorder ordering guarantees a particular sequence of edges and numbering of internal nodes for any topologically identical tree.
Splits objects are defined in as.Splits(), and denote split membership as
binary 0/1 in an underlying raw object.
- After completing each optimization or user-visible change, update
NEWS.mdbefore moving on to the next task. - Increment the
.900Xdev version suffix inDESCRIPTIONwith eachNEWS.mdupdate. - All new and changed code must have test coverage. The GHA test suite uses codecov; uncovered lines will block the PR. Cover happy paths, error branches, and edge cases (e.g. early returns).
descendant_edges_single(): the O(n_edge) linear scan per node looks theoretically O(n²), but benchmarking (CSR index, vector-of-vectors) showed the original is faster at all practical sizes (up to 50k tips) due to cache-friendly sequential access over contiguous Rcpp memory. Not worth optimizing.