fgl icon indicating copy to clipboard operation
fgl copied to clipboard

Shortest path algorithms assume that vertex only have one edge between them

Open gregnwosu opened this issue 8 years ago • 2 comments

In the case of vertices representing cities and edges representing roads. There are multiple edges between cities representing different route possibilities. Shortest path just gives me a list of nodes and there's no way to discover which edges are involved in the route from a list of nodes.

gregnwosu avatar Jun 28 '17 05:06 gregnwosu

Yes, a lot of FGL was written assuming no multiple edges.

Unless you want to duplicate the function space, we can't change this until the next major version bump.

ivan-m avatar Jun 28 '17 05:06 ivan-m

Understood, I think duplicating the function space is okay until the next major version. Another function could return a list of edges (lets call it an "EdgePath"). I naively think this would be a relatively simple fix. In the next version we can make Path = [LEdge] .

gregnwosu avatar Jun 28 '17 08:06 gregnwosu