On Wed, Oct 28, 2015 at 1:43 PM, Jeremiah Willcock <jewillco@yahoo.com> wrote:
> From: Dominique Devienne <ddevienne@gmail.com>
>    Graph G(edges.begin(), edges.end(), edges.size());

The third parameter to the constructor is the number of vertices, not the number of edges.  If you want to give the edge count explicitly, that is placed as the fourth parameter, after the edge count.

Thanks a bunch Jeremiah. Silly mistake on my end...

In the mean time (I'm on GMT+1), thanks to [1], I've completely changed the way I build the graph, working around the above mistake, and was able to make progress.

I now get the much more sensical "Graph has 112 vertices and 1257 edges".
But my graph is not a DAG. So thanks to [2] I found my back edges (4 of them).
So next I tried to get a good report on the cycle using [3] and strong_components(), which yields these two questions:
- Why do I get 106 strong components? Only 1 of them contains more than 1 vertex. All others have a single vertex.
- In the 1 component with more than 1 vertex, which looks like my cycle, is there a way to know the edges of the cycle?

Thanks, --DD

[1] http://stackoverflow.com/questions/3100146
[2] http://www.boost.org/doc/libs/master/libs/graph/doc/file_dependency_example.html 
[3] http://www.boost.org/doc/libs/1_59_0/libs/graph/example/strong_components.cpp