[Graph] Need help with Subgraph and adjacent_vertices.

I'm having trouble finding the adjacent vertices in a subgraph, using
the adjacent_vertices function. Although, it seems to work fine on a
graph that isn't the subgraph of another.
I'm using the g++ compiler, along with boost_1_37_0.
The following code demonstrates the problem; the adjacent vertices to 4
in subG should be 2 and 3. However, I get 5 when I run the program.
Any fixes or suggestions would be greatly appreciated.
#include <iostream>
#include <vector>
#include

On Apr 5, 2010, at 2:59 PM, Marcus Fontaine wrote:
The following code demonstrates the problem; the adjacent vertices to 4 in subG should be 2 and 3. However, I get 5 when I run the program.
I believe the problem has something to do with the way you are adding
vertices to the subgraph. Try printing out the vertices of the subgraph:
typedef graph_traits<Graph>::vertex_descriptor Vertex;
typedef graph_traits<Graph>::vertex_iterator VertexIterator;
std::pair
participants (2)
-
Marcus Fontaine
-
Trevor Harmon