Boost logo

Boost Users :

Subject: [Boost-users] [boost][graph] Efficiency problems in boost::adjacency_list
From: Yinghai Lu (elvis.lu_at_[hidden])
Date: 2009-06-22 13:41:24


hi, erveryone,
I'm building a graph incrementally using boost::adjacency_list with bundled
properties. I did the following typedef:
typedef boost::adjacency_list<setS, vecS, bidirectionalS, EdgeClass,
NodeClass> Graph;

EdgeClass and NodeClass is some classes holding the properties of edges and
nodes so that I can access them by using g[u].some_property = 1;

My problem is that I'm building the graph incrementally and the graph is
huge. And with the definition I'm using the vector to hold the vertices,
which results in many memory relocation and copy and makes the program
stagnate. I wanted to use listS/mapS for the vertex list instead. However,
the bundled property seems to work only with vecS only. Otherwise,
compilation error will be thrown. So does anyone know how to solve this
problem? Thanks.

-- 
Best Regards,
Yinghai


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net