Boost logo

Boost :

From: Jan van der Veen (j.van-der-veen_at_[hidden])
Date: 2001-07-27 08:54:45


Hi Jeremy,

this does not compile and I understand why.

#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/strong_components.hpp>
#include <boost/graph/connected_components.hpp>

using namespace std;
using namespace boost;

int main(int, char**)
{
    adjacency_list<listS, listS, undirectedS,
        property<vertex_index_t, int > > G;

    vector<unsigned> vecuComponent(num_vertices(G));
        
    strong_components(G, &vecuComponent[0]);
    connected_components(G, &vecuComponent[0]);
}

My question is: Why didn't you add a named parameter for the component map? If
I understand correctly color_map and all the other maps use vertex_index. So if
there was a component_map

    connected_components(G, component_map(&vecuComponent[0]));

should compile.

Another question: Why doesn't strong components check if G is directed?

Jan.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk