mirror of
https://github.com/gonum/gonum.git
synced 2025-10-12 18:40:09 +08:00

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.