Boost logo

Boost Users :

Subject: [Boost-users] [BGL] Large graphs
From: Sebastian Weber (sebastian.weber_at_[hidden])
Date: 2009-07-09 07:17:57


Hi!

I am using the BGL to represent a fractal structure which I iteratevley
grow. As I intend to handle large structures I usually preallocate the
required space for the final fractal in the beginning. My construction
process then uses the graph object to put in new edges into the same graph
object. Now, if I always use the same graph object things get messed up for
large fractals. However, if I use 2 graph structures, one which represents
the last and one the comming generation, everything is ok (which doubles
memory requirements for nothing). I have no clue what the problem here is.
For small fractals both schemes produce correct fractals, but not for large
ones.

I suspect that there are some really strange problems here with allocated
memory going on. BTW, is there a way to preallocate the required memory for
the edges of a adjacency_list graph? I do know ahaed how many edges in total
and how many edges per vertex will be in the final graph, so that I could
preallocate memory if it is possible. Preallocating vertices is easy...

In case someone may have an idea, but needs the code I am having trouble
with, no problem, just contact me.

Thanks in advance,

Sebastian



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