I think you are asking about implicit graph where vertices and edges are unknown at the begining and they are added during the execution of an algorithm. You can do it in two ways
a) If you are using internal properties then
add_vertex( vertex_whatever,g) will work
b) If you are using exterior property map then use vector_property_map since the size is unknown
http://www.boost.org/doc/libs/1_47_0/libs/property_map/doc/vector_property_map.html
Anil


 
On Tue, Aug 9, 2011 at 3:13 PM, Geoff Hilton <geoff.hilton@t-optlogic.com> wrote:
If I know that during the execution of the algorithm the graph size must be grown by X number of vertices in one go, is there a way this can be done to avoid multiple allocations such as when using std::vector's reserve(..) or resize(..) member functions without subverting the BGL's documented interface? Currently I use a for loop which iterates over add_vertex(vertex_property, graph). Can a reserve and/or resize equivalent otherwise please be added somewhere?

Thank you,
Geoff

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users