-
Notifications
You must be signed in to change notification settings - Fork 4
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
Best way to turn for_each_handle into a generator instead of an internal iterator #4
Labels
help wanted
Extra attention is needed
Comments
For now we can just do a loop in a range def nodes:
nodeId = og.min_node_id
maxNodeId = og.max_node_id
while (nodeId <= maxNodeId):
if(og.has_node(nodeId):
yield og.get_node(nodeId)
nodeId+1 But this will cost in efficiency and long run needs to be fixed. |
This approach works for node handles. Unfortunately it will not work for |
I opened an issue at libhandlegraph |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for_each_handle
andfor_each_path
are the two key methods that need efficient implementation.However, these are C++ internal iterators while the librdf would like to see a generator.
I would love to see some help on how to best convert from the one into the other.
The text was updated successfully, but these errors were encountered: