Boost logo

Boost :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2005-03-17 23:50:27

On Mar 17, 2005, at 8:49 PM, Vikram Shrowty wrote:
> If I am understanding this correctly, after erasing a vertex we go
> through all vertices in the graph and reindex their edges/ This is
> because there may be edges to/from vertices after u. But this can be
> avoided if u was the last vertex in the graph, right?
> So this...
> //....
> g.m_vertices.erase(g.m_vertices.begin() + u);
> //....
> if (u != num_vertices(g)) {
> //all the re-indexing code
> }
> is a valid optimization isn't it?

Yep, that's a valid optimization. I've just committed your changes to
CVS. Thanks!


Boost list run by bdawes at, gregod at, cpdaniel at, john at