check_parsimony
take a vector of shifts edges, and check whether the
number of groups of the tips induced by this allocation is exactly the number of
shifts plus one. This is equivalent to parsimony when there is no homoplasy (i.e. no
convergent regimes).
check_parsimony(tree, edges, ...)
phylogenetic tree
a vector of edges of the tree, where the shifts are
possibly, a list giving the descendant tips of each edge
boolean : TRUE if the allocation is parsimonious.
This function computes explicitly the clustering of the tips, using
function clusters_from_shifts
.
By default, this function uses enumerate_tips_under_edges
to compute
the list of tips under each edge, but a list can be provided (to avoid extra
computation, if many tests on the same tree are done).