Looks like the graph is represented by an adjacency matrix, where the element at (a, b) tells you whether there is an edge from node a to node b with weight x or not by having the value (Just x) or Nothing, respectively. Whether the matrix is sparse depends on the data, i.e. how many edges are in the graph.

But perhaps I misunderstood your question.

Thomas


Am 09.07.2013 23:26, schrieb KC:
type Graph n w = Array (n,n) (Maybe w)

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to