haskell / fgl

A Functional Graph Library for Haskell

Home Page:http://hackage.haskell.org/package/fgl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

gregnwosu opened this issue · 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.

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.

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] .