[Graph] Very minor typo/doc-bug in bellman-ford example
I'm not quite sure where to submit this, but the main boost.org site noted that bug reports are often best reported to mailing lists, so here goes. In the documentation for the Bellman-Ford algorithm, there is an example program (bellman-example.cpp) that contains the following 'main' function (snippet): main() { enum { u, v, x, y, z, N }; char name[] = { 'u', 'v', 'x', 'y', 'z' }; typedef std::pair < int, int >E; const int n_edges = 10; E edge_array[] = { E(u, y), E(u, x), E(u, v), E(v, u), E(x, y), E(x, v), E(y, v), E(y, z), E(z, u), E(z,x) }; ... Note that edge_array[] is of type "E", which of course, should be "Edge". The example doesn't work as listed, as such. - Greg Link
On Apr 5, 2006, at 2:22 PM, Greg Link wrote:
I'm not quite sure where to submit this, but the main boost.org site noted that bug reports are often best reported to mailing lists, so here goes. In the documentation for the Bellman-Ford algorithm, there is an example program (bellman-example.cpp) that contains the following 'main' function (snippet):
main() { enum { u, v, x, y, z, N }; char name[] = { 'u', 'v', 'x', 'y', 'z' }; typedef std::pair < int, int >E; const int n_edges = 10; E edge_array[] = { E(u, y), E(u, x), E(u, v), E(v, u), E(x, y), E(x, v), E(y, v), E(y, z), E(z, u), E(z,x) }; ...
Note that edge_array[] is of type "E", which of course, should be "Edge". The example doesn't work as listed, as such.
E is a typedef of std::pair
participants (2)
-
Doug Gregor
-
Greg Link