3 ms·
I’m very far from being a rust expert but it was difficult to build a bi-directional graph because it’s difficult to connect the nodes together. A simple recurs
by speedgoose 5y ago
I’m very far from being a rust expert but it was difficult to build a bi-directional graph because it’s difficult to connect the nodes together. A simple recursive algorithm will not work. I ended up using a crate.
I found the following article interesting on the topic :
https://aminb.gitbooks.io/rust-for-c/content/graphs/ https://aminb.gitbooks.io/rust-for-c/content/graphs/
- jupp0r 5y agoIt shouldn't be difficult: 1. You have a graph struct that has ownership of all nodes (in Rc containers). 2. Nodes have Weak references to connected nodes