yourbasic / graph

Graph algorithms and data structures
https://yourbasic.org/golang/your-basic-func/
BSD 2-Clause "Simplified" License
711 stars 64 forks source link

Detect cycles #12

Open blacktop opened 2 years ago

blacktop commented 2 years ago

I apologies if your pkg can already do this, but I was perusing your docs and didn't see an easy way to. I'd like to tell which vertices contain cycles or paths back to themselves.

I do know that you can tell me quickly if it is Acyclic, but I'd like to know which nodes have cycles.

Is that possible and if not how would on add that?

Thank you!

tjayrush commented 2 years ago

Have you made any progress on this @blacktop and or the maintainer? I'd be interested in this as well. Nice package by the way.