Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Large graphs
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-07-09 08:01:39


>
> 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.

It's hard to say what might be wrong without actually seeing what you're
doing. I've used adjacency list to build some pretty large graphs, and
haven't had any problems (although the application wasn't quite that
advanced).

> 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...

I think there's a ticket filed that requests this feature. If not, there
should be.

Andrew Sutton
andrew.n.sutton_at_[hidden]



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