-
Notifications
You must be signed in to change notification settings - Fork 2
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
DAG traversal #4
Comments
|
Fast DAG-assuming implementations that are drop in replacements for spicy.sparse.csgraph functions (dijkstra, connected components) would be particularly awesome... |
I have since restarted re-implementing the That library is more mature and importantly already on PyPI with pre-compiled binaries: pip install navis-fastcore As mentioned on Slack: it's called The functions you were looking for already exist: Both functions are ~ on par with the Let me know how this works for you! I'm also still looking for other operation that may benefit from this approach - just in case you have more suggestions. |
I just quickly cobbled something together: https://github.com/schlegelp/fastcore-rs/blob/main/navis_fastcore/wrappers/csgraph.py So far this lives only on Github but with it you could do this: try:
from navis_fastcore.wrappers.csgraph import dijkstra
except ImportError:
from scipy.sparse.csgraph import dijkstra Have a look at the functions and let me know what you think. |
Skeletons being directed acyclic graphs (DAGs) opens up some neat options for graph traversal that would not work on general graphs. We can leverage that to speed up certain operations. Off the top of my head:
The text was updated successfully, but these errors were encountered: