This is a really cool project and the doc comments are great too! Why the need for the simorgh branch though? #9
Replies: 1 comment 1 reply
-
Thank you for your kind words @jackoconnordev :)
Yes it's still possible to implement your own storage solution. Each storage can have it's own implementation of the Below is my rant about the current design and goal What I have in mind in terms of abstraction is something likes this now:
You have the low level storage implementations like adjacency matrix, list, map, and so on. On top of them, you can create graphs like a simple graph, DAG, and so on. On top of a graph, you can create a view. A view is basically how you perceive the structure of the underlying graph. For example, you can view a directed graph as undirected or vice versa. You can filter some nodes and edges that you don't want to see temporarily, for example the result returned from a shortest path algorithm is a view of the input graph that only exposes the shortest path and hides other nodes and edges. A view itself implements the provide layer so you can again run algorithms on it like DFS for example. The provide layer is the glue that connects the implementation to the algorithms. I'm not still quite sure about To be honest, Again, thanks for your heartwarming comment. |
Beta Was this translation helpful? Give feedback.
-
Preamble
Hi @maminrayej, reading through this project has been an education in modularity and abstraction. I particularly liked separating abstract graphs and graph storage implementations into separate modules. I've been reading up on software design principles and this is another concrete example I now have in my head of the dependency-inversion principle being good (high-level/low-level modules should be separated by an interface) alongside ORMs like Sequelize. I can also see how traits play nicely with good design principles.
I'm hoping to do a basic rust version of PGMpy someday. Graph algorithms are essential for this and your crate is easily the most digestible example of implementing graphs in Rust I've seen so far, so thank you!
An actual question
Looking through the simorgh branch I see the storage module is gone and is replaced with:
Do you think you could elaborate/document somewhere on what it is you didn't like about the module structure from the main branch and why storage not having its own dedicated module is preferable to you?
Also this could be a silly question but is there just one storage implementation based on idmap now or is it still possible to have different implementations of graph storage like an adjacency list or adjacency matrix?
Beta Was this translation helpful? Give feedback.
All reactions