Boost logo

Boost Users :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2006-04-10 15:56:05


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<int, int>. That's okay--it's used to
build the graph. The example compiles and runs properly for me.

        Doug


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net