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
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.
The text was updated successfully, but these errors were encountered:
As far as I can tell,
step_handle_t
doesn't track an orientation. There's noflip
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
orget_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.
The text was updated successfully, but these errors were encountered: