libbdsg
libbdsg copied to clipboard
Example of using bdsg.bdsg.PositionOverlay
Hello,
sorry for opening many issues. I'm trying to work out the problem explained here. In that topic, I've been suggested to use bdsg.bdsg.PositionOverlay() to perform efficient lookup. I'm struggling to understand how to use it though, would it be possible to provide some detailing/example of those?
Thank you in advance
Andrea
No worries. The PositionOverlay takes some other graph as an argument to its constructor like overlay = bdsg.bdsg.PositionOverlay(graph). From then on overlay can access graph elements from graph using both graph's existing methods (things like overlay.get_handle()), and also the additional methods from the PathPositionHandleGraph interface (things like overlay.get_path_length() and overlay.get_step_at_position()).