Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
DennisP
· 10y ago · 0 comments
How do you handle cycles? I've seen discussions on places like /r/rust where people didn't seem to have any pleasant answers.
Comments
[–]
mitchmindtree
10y ago
I tend to use petgraph[1] when I need a graph-like data structure (the only time I've needed cycles). Super fast, distinguishes `Node`s from `Edge`s, lots of useful items for different kinds of traversal.
[1]:
https://github.com/bluss/petgraph