Conversation
|
Sorry to keep hammering on this but there are still tab characters ;-) A question: Is there a point to using a lazy adjlist instead of an adjlist? Won't it usually traverse the whole graph anyway, meaning that a lazy adjlist is more likely to be a performance hit than a performance gain? I don't know. It won't traverse the whole graph if the graph is not connected. Perhaps that is not such an uncommon situation with real-world directed graphs. Anyway, it's just a thought. I wouldn't necessarily spend time changing this—it might turn out to make next to no difference. However, if you are going for the ultimate performance (part of the reason for this function is to have better performance than igraph_dfs, right?) then you might want to investigate this. |
|
Thanks, I finally fixed my editor to avoid tabs, sorry about that. Laziness is a difficult beast. Honestly I'm happy with either |
|
I think it's useful to have |
|
As for whether |
|
Otherwise, @iosonofabio I am totally fine with the proposed simple interface for |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
|
Just a heads up; this PR was originally motivated by the fact that we've had an @iosonofabio We are about to turn things upside down soon(ish) by transitioning to 64-bit integer types and there will probably be lots of merge conflicts with pending PRs. What's the status of this PR, shall we try and finish this and get this merged before the integer transition or shall we put this aside and deal with it again after the integer transition? (The same question also applies to #1257) |
|
Thanks. The main reason for me was Python, that was solved separately. I also don't know if the simple function is faster than the full one, for either BFS or DFS. So renaming the other one was good but the key issues are out there. I could just quickly finish this one for symmetry, then we have bsf and dfs with both simple siblings, or i could just let it fall and come back to it after the 64 bit transition with a fresh PR |
|
We can come back to this after the int64 transition, since it's not urgent. |
I'm trying to implement depth first search in the Python interface copying from breath first.
Python-level BFS uses the C core
igraph_i_bfsfunction, which is a quicker and less flexible version ofigraph_bfs.We don't have an equivalent
igraph_i_dfsfunction.This PR aims initially at providing the latter function for internal use and for use in the Python interface. Depending on the feedback received, that scope might expand into a slightly deeper redesign of both visitor functions.
Either way, efficient traversal functions are essential to both
igraphand its high-level interfaces, so this is quite useful I think.