
23 Feb
2010
23 Feb
'10
8:11 p.m.
On Tue, Feb 23, 2010 at 2:27 PM, T MacAdam
Does anyone know a way to speed up adjacency_list deallocation for debug builds?
The technique I use isn't documented, but it has been discussed before on the list. It also uses implementation details so it's not guaranteed to work across releases. myGraph->m_vertices is the vector storing the vertices. Just call reserve() on it when you know the number of vertices ahead of time. If you want to do the same with edges use myGraph->m_edges, but you're using a list for the edge storage so it doesn't apply to this case. It would be nice if there was a way to reserve storage for vertices and edges in the actual graph interface. HTH, --Michael Fawcett