blacksmithgu / obsidian-dataview Public
generated from obsidianmd/obsidian-sample-pluginNew 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
Find all paths between 2 nodes? #478
Comments
|
Do you want all shortest paths, all paths of length <= N? There are exponentially many paths between any two nodes in a graph, which would lag out quickly. |
|
I think the result should be all simple paths between 2 arbitrary nodes. I originally thought that this feature could be easily implemented with a simple DFS and cut out all branches that exceed a given max depth and didn't think much about the time complexity... The original motivation for this feature is that as a medical student, I'm struggling with connecting different systems (e.g., cardiovascular system, immune system...) together. It would be great if dataview could help reveal the hidden connections between nodes. Apparently, neither I nor the computer is good at connecting things QAQ... I will close this issue since it is not feasible due to the high order of time/space complexity. Thank you for your reply. PS: dataview is a great plugin!!! :) |
|
One option would be to compute the shortest path, and then compute all other paths that are at most N (say 1 - 3) longer than the shortest path. This is generally computationally feasible (if a little slow). I think the coolest thing that could be done here would be to implement a graph viewing extension to Dataview which embeds a graph view that you can filter on. I wonder how feasible that is. |
|
I think dataview is quite similar to SQL. After all, it's like writing SQL to me so far. However, the reason that I choose obsidian (or other software that has 2-way links) over Excel is that it takes the whole vault as a graph instead of a table. Unfortunately, the filters function in the graph view is not very handy, which makes the global graph view almost useless as the size of the vault quickly grows (I created nearly 3.5k nodes last semester and my vault will continue to expand at this speed in the following 2-3 years QAQ). I think it would be really useful if dataview could include some NoSQL/graph DB features, and what you have commented sounds truly promising. I'm looking forward to that :) |
Is your feature request related to a problem? Please describe.
I wonder if there is a way to display all paths between 2 given nodes? I have tried plugins like Journey but it only gives the shortest path using the Dijkstra algorithm and it does not support code fences.
Describe the solution you'd like
I think it would be great if dataview support query like this:
and the output could be a nested list like (it would be even better if the result could be displayed in mermaid or some other graph view):
The text was updated successfully, but these errors were encountered: