Subject: Re: [boost] [graph] out_edges sort
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-09-08 20:28:53
On Thu, 9 Sep 2010, fab wrote:
>> It's not so much that there's an empty operator=(), most likely; I believe
>> all or almost all of the graph types produce a new object whenever you
>> dereference an edge iterator, and so modifying it does not change the
> yes, you are right.
>> The graphs typically don't store edges in the same form that users see them
>> as, so the edge iterators don't give references into the internal graph
>> data. What kind of graph are you using? Can you just sort the edges before
>> you put them into the graph? Also, using something like setS as the out
>> edge container would probably give a sorted out edge order.
> Yes, but in these 2 solutions I need to create a new graph. In my case, I
> need to sort the out_edges depending on values inside each node computed in a
> previous visit. But maybe the best solution is to create a new graph...
> There is no way to do a sort in place ?
Not using the "official" interfaces, AFAIK. What are you trying to do?
Maybe there's a different algorithm in BGL that might do what you want.
-- Jeremiah Willcock
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk