so the gist I'm getting is that Box is for trees and Rc is for graphs
-
-
Replying to @mountain_ghosts
Tree (every node has a single parent): Box DAG (nodes can have multiple parents, but no cycles): Rc Cyclic graph: Rc+Weak or Vec/slab/slotmap/generational-arena
1 reply 0 retweets 3 likes -
Replying to @stjepang
I imagine doing a cyclic graph in dotfile style: store nodes, with IDs, and store edges as a distinct set -- no direct pointers between nodes
2 replies 0 retweets 2 likes
Replying to @mountain_ghosts
Yep, that's a great way of representing graphs in Rust. Here's an example using this approach - a splay tree which is actually a cyclic graph because every node holds an ID of its parent: https://github.com/stjepang/vec-arena/blob/master/examples/splay_tree.rs …
10:42 AM - 20 Mar 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.