
On Sat, 1 Oct 2011, Dave Abrahams wrote:
on Sat Oct 01 2011, Pablo Fleurquin
wrote: on Fri Sep 30 2011, Jeremiah Willcock
wrote: On Fri, 30 Sep 2011, Pablo Fleurquin wrote:
Ok, but can you give me a hint, how to write a wrap for this? The function I use is boost::strong_connected_component
Look at the documentation page for that algorithm; there is a list of concepts it requires its graph type to model, with links to individual documentation pages for those. Those pages will list which functions you need to implement and how they are supposed to behave. You will also need a graph_traits specialization; the documentation pages will also say what that should look like.
Jeremiah, I could have _sworn_ there was built-in support to make std::vector's usable directly as graphs. Am I mis-remembering? Was it removed?
Dave, that would be great, the built in support is still there? I tried to follow what Jeremiah told me but it is too advance for me. In future I will be able to do so but I need this done now because I do not have time to deepen these days. I want this code to be written using boost so I start to get used to it. THANKS!
Well, it's not documented :(, but it's all in this header: http://www.boost.org/doc/libs/1_47_0/boost/graph/vector_as_graph.hpp You might also read http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/leda_conversion.html which should guide you through the principles that are implemented by that header (but for a different graph type).
There are also files libs/graph/example/vector-as-graph.cpp and libs/graph/example/filtered_vec_as_graph.cpp that show simple uses of vector_as_graph. -- Jeremiah Willcock