JuliaLang/Graphs.jl — pull request #91 by deinst (2014-05-17 03:28:54+00:00)
Title: Dijkstra's algorithm as currently formulated requires vertex_map and edg...

...e_map

in addition to incidence_list. This adds the appropriate check, as well as fixing the documentation.

This is probably too trivial to deal with, but the code does require `vertex_map` for indexing into the color table and `edge_map` for indexing into the distance table. The call to `vertex_index` is probably not worth avoiding, but it seems to me that it might be worth moving the weight table into a function that is passed in. I often need to compute shortest paths on graphs where all the edges have the same length, and so do not need a table, and in the cases where I don't the edge length is stored in a structure (type) that is easily accessible, and I doubt the cost of extracting the length into a separate array is substantially less than calling it as we need it.

However, it makes no sense to just add an edge weight function just to Dijkstra's algorithm, and I figured that I'd let wiser heads tell me off before I went off and made a mess of things.