Skip to content

Getting roots from tree sequence #2299

Answered by benjeffery
haono asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @haono!
Thanks for your question. The TreeSequence doesn't store any cached information about roots, so to find them you have to work through the trees. Are you finding this to be a bottleneck? It shouldn't be that slow to go through the trees. Feel free to paste some code of how you're doing this if you want us to have a look.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@haono
Comment options

Answer selected by haono
Comment options

You must be logged in to vote
1 reply
@haono
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants