Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] passing a graph from one function to another
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2008-11-19 14:10:59

> Yes, I tried using add_vertex and add_edge and it works fine. But I assume
> that add_vertex and add_edge is much slower than using
> graph_t myGraph(array, edge_array + num_arcs, weights, num_nodes);
> Is this true or not? Does anyone have experience on that?
> My graph has over 10^6 edges.

It should not be. The cost of insertions is constant. You'll see a slight
speedup if you're using VertexList == vecS, but since you're not, it
shouldn't matter.

Andrew Sutton

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at