Hi,
I am new to the Boost graph library and trying to learn from examples in
the documentation. I would like to ask about the simple vertex
iterator's behavior. Below is sample code. In a nutshell, the program
adds some edges to a Boost graph, then prints the vertices. The vertex
numbers added are not contiguous: the loop basically adds edges between
vertices 0, 1, 2, 6, and 7; no edges are added for vertices 3, 4, 5.
Then I use a vertex iterator to show tine in- and out-degree of each
vertex.
My expectation was that the iterator would only show me the vertices for
which I added edges, but instead it shows vertices from 0..7,
essentially from the low value to the high value. This seems to be a
feature, but I don't know where to look to find an explanation. Perhaps
this behavior is dictated by my choices of data structures vecS?
So far I have been relying on the online documentation, which I find to
be quite difficult to use. For example, the web site doesn't seem to
have a comprehensive index to Boost generic types and functions, just
that alone would be an enormous help.
Is the Boost book is (substantially?) better than using the online docs,
or is it just the same content on paper?
Please advise, thanks for your help.
chris...
--------
[code]
#include <iostream> // for std::cout
#include <utility> // for std::pair
#include <algorithm> // for std::for_each
#include