Boost logo

Boost Users :

Subject: Re: [Boost-users] [Graph] Static allocation of nodes and edges
From: Sensei (senseiwa_at_[hidden])
Date: 2013-11-08 15:02:44


On Friday, November 8, 2013, Jeremiah Willcock wrote:
>
> You can pass in a sequence (iterator range) of edges and the
> compressed_sparse_row_graph code will automatically count and sort them.
> Can you get that as a single entity (or a way to compute the edges), at
> least?
>
>
Well, yes. Edges are computationally intensive, but can be computed. I'd
like to avoid multiple copies of nodes/edges, since the graph can easily
occupy 10 gb of ram.

I have the list of nodes in a std container, for completeness of
information. The edges are calculated by a functional on node pairs (ie, I
need n^2 operations).

I could create a list of pairs of nodes for edges, but I think it would
defeat the purpose of using a graph, at least, if creating the graph
involves copying all edges. If there were a sort of "moving semantics" with
this respect, it would help a lot.

Cheers!



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