Boost logo

Boost :

From: Kevin S. Van Horn (kevin_vanhorn_at_[hidden])
Date: 2001-04-05 09:21:22


I'm writing code to read in and write out a particular instantion of the
adjacency_list<> template. In doing so I find it convenient to start with
an empty graph (no vertices), then read in the number of vertices and make
the graph have that number. The only way I have found to do this is with
the following ugly and somewhat inefficient piece of code:

  for (i = 0; i < nv; ++i)
    add_vertex(x);

It would be nice to be able to directly set the number of vertices after
construction.


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