Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for_each_step_on_handle will give you step_handle_t values for which get_handle_of_step will return the reverse of the handle_t you started with #37

Open
adamnovak opened this issue Dec 24, 2019 · 0 comments

Comments

@adamnovak
Copy link
Member

As far as I can tell, step_handle_t doesn't track an orientation. There's no flip for it; it always is in the orientation of the path it is part of.

But then when you loop through the steps on a handle, you'll get all the steps that visit the handle's node in both direction, but each step you get will be in the path's forward orientation. So if you want to do something like see what paths leave a handle to the left, you need to do a bunch of orientation tracking and call get_next_step or get_previous_step depending on how the path went through the handle you started with.

And if the path went through your starting handle backward, get_handle_of_step will return the reverse of the handle you started with.

None of these caveats seem to be documented in the PathHandleGraph interface. At the very least we should point them out.

I kind of want to give orientations to step handles, so that you can have a handle to the reverse orientation of a path where next is previous and visa versa, and a way to get and flip that orientation flag. That would make navigating along paths much harder to mess up when you find them from handles, but it would also ask more of our implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant