alga
alga copied to clipboard
Implement connectedComponents and isConnected
Based on #196.
I derived my own algorithm to get the connected components directly from the graph's structure. I'm not 100% on the complexity of it.
I'm also not 100% sure where these functions should go. They are intended for general graphs, but we can guarantee that every component isn't empty.
~~Also, there doesn't seem to be a place to put small tools that might be useful elsewhere, am I overlooking this?~~ I was! src/Algebra/Graph/Internal.hs
cc @bolt12 ~~(Did you get to this already? I couldn't find you work anywhere)~~
TODO:
- [ ]
Set.disjointturns out to be fairly new. Backport? - [ ] Determine complexity
@Synthetica9 Many thanks for the PR! I'm currently travelling and have a few other PRs to review, but I'll try to come back to you soon!
I did not had the opportunity to start working on this yet but since you presented your work I think the best thing is to use your code! Once I'm free from other academic tasks I can maybe we can go through this together :)
@Synthetica9 It's been a while -- have you had a chance to look at the comments above?