WIP: start implementing Undirected module#58
WIP: start implementing Undirected module#58tcoopman wants to merge 5 commits intobitwalker:mainfrom
Conversation
|
@tcoopman Thanks for contributing! There are really two options - if we want to consolidate implementations for some graph operations, then we can parameterize them on their directionality and move them to a common implementation module, e.g. something like In either case, I appreciate the contribution, so take whichever approach is preferable for you at this point, and if need be it can always be refactored later. |
|
I will maybe pick it up at some point again, but I currently don't have the time for it. I like the idea of a common graph module and operations with directed and undirected as arguments for the functions. Although I'm not sure if that should be exposed as the graph type is already directed or undirected. I'm also not sure if all functions should have an implementation for both types. For example reachable_neighbors should probably be specified differently for undirected graphs, because you always have a path back. |
|
@bitwalker is this what you had in mind? A common module which delegates function to directed or undirected? |
As a proof of concept, I've started to implement some Undirected functions (see #39). I've did it by copying all things over from
Directedand changing some parts. This is not optimal.If you feel like this is useful, I might add more functions.