-
Notifications
You must be signed in to change notification settings - Fork 73
Description
It's a bit of a shame that things like bfs and dfs are duplicated for every single AdjacencyMap representation. For example Algebra.Graph.Labelled.AdjacencyMap does not even have a DFS at the moment. They should be rewritten and unified in terms of ToGraph instead.
Of course not all the instances of ToGraph have efficient implementations of things like postSet, but that could also be improved, by splitting the class up and having Graph and AdjacencyMap implement different subsets of it, with utilities functions called, e.g. postSetSlow that provide a shim to the full set of methods. It seems like nearly all of the typical traditional graph algorithms need an efficient postSet method for traversing the graph, whereas very few of them need an efficient connect method.