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
{{ message }}
Repository navigation
Add node traversal methods based on time ordering - #399
Addresses #246 using a very simple implementation as discussed. I went with timeasc and timedesc as the possible values for order= as they seemed to fit the existing values.
One thing I forgot to add - this treats each root separately, so if you call without a node and the tree has more than one root then the sort is only ordered for each root, not globally. This is how the other sort methods work, but I think it might make less sense for time ordering.
Hi @benjeffery: thanks for getting involved with tskit development. If your head is in the ordering methods, you might like to take a stab at #384 - there are definite use cases for visiting the edges of a tree sequence (rather than the nodes of a tree) in order of (a) child node times and (b) parent node times. In that issue I suggested simply re-ordering the edge table, but since we might want to keep the edge IDs consistent between the two methods, I wonder if providing an order argument to the ts.edges() method might be better?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #246 using a very simple implementation as discussed. I went with
timeascandtimedescas the possible values fororder=as they seemed to fit the existing values.