Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph] set of edges
From: Michael Fawcett (michael.fawcett_at_[hidden])
Date: 2009-03-17 11:48:57


On Tue, Mar 17, 2009 at 11:42 AM, Andrew Sutton
<andrew.n.sutton_at_[hidden]> wrote:
>>
>> > I would guess it's working for me by accident since I'm never removing
>> > anything from the graphs I create.  I'll make sure to keep my usage to
>> > listS for now.
>
> Be forewarned: num_edges()/num_vertices() with listS is O(n).

So what's the recommendation? The Known Bugs page says that anything
other than listS is not guaranteed to work for EdgeList, but if
std::list has O(n) size(), then num_edges()/num_vertices() becomes
O(n)?

Or were you talking about OutEdgeList?

Are there *known* cases where vecS is bug-free when used for the
EdgeList? In my case, I know the total number of edges ahead of time,
and no edges or vertices will ever be removed.

--Michael Fawcett


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