Commit Graph

4 Commits

Author SHA1 Message Date
Dan Kortschak
0fb53cb2a5 graph/multi: use more efficient and correct direction dedup logic
Also add test case to testgraph corpus.
2021-06-23 21:00:45 +09:30
Dan Kortschak
3129c79de2 graph/testgraph: test for missing From and To paths 2019-07-25 07:03:54 +09:30
Dan Kortschak
761876748e graph: make edges and lines reversible 2019-03-13 07:14:55 +10:30
Dan Kortschak
a8f1562992 graph/testgraph: new package for testing graph implementations
Currently variant line types do not work the same way as they would with
a slice of edges because access to a []graph.Edge also allows the
elements of that slice can be type asserted to richer types like
graph.Line or graph.WeightedEdge for example. This cannot be done with
the API as is stands with the iterator-holding edge being down graded
from one of the richer types.
The problem can be avoided by either making graph.WeightedLines also
satisfy graph.Lines (same for edges), or by down-typing the edges in the
non-weighted edge return methods for the graph implemetations.
2018-11-21 11:35:03 +10:30