You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One can compute the combinatorial rank of a tree with Tree.rank (see here). Currently, this is only used for very small trees, but if a user wanted to count unique topologies in a tree sequence with larger numbers of samples, t.rank() for t in ts.trees() would be very wasteful and slow. Calculating tree ranks is done leaves->root so, like typical incremental algorithms, only an upward traversal after an SPR is needed to adjust the rank during a tree transition. The simple incremental algorithm to generate per-tree ranks in a tree sequence would follow almost exactly the same approach as counting species tree topologies, except:
the per node state would be a RankTree instead of a TopologyCounter
per-root state would not be merged since multiply-rooted trees cannot be ranked, it would likely have to return a list of ranks that maps to the roots of the current tree
The text was updated successfully, but these errors were encountered:
One can compute the combinatorial rank of a tree with
Tree.rank
(see here). Currently, this is only used for very small trees, but if a user wanted to count unique topologies in a tree sequence with larger numbers of samples,t.rank() for t in ts.trees()
would be very wasteful and slow. Calculating tree ranks is done leaves->root so, like typical incremental algorithms, only an upward traversal after an SPR is needed to adjust the rank during a tree transition. The simple incremental algorithm to generate per-tree ranks in a tree sequence would follow almost exactly the same approach as counting species tree topologies, except:RankTree
instead of aTopologyCounter
The text was updated successfully, but these errors were encountered: