From what I can glean from the BGL documentation, I guess the answer will be "No, but may be some time in the future". I so, how soon in
Hi, Is it possible to order the edges of a vertex of a boost graph? the future? Thanks, Louis.
Choosing the EdgeList type The EdgeList parameter determines what kind of container will be used to store the out-edges (and possibly in-edges) for each vertex in the graph. The containers used for edge lists must either satisfy the requirements for Sequence http://www.sgi.com/tech/stl/Sequence.html or for AssociativeContainer http://www.sgi.com/tech/stl/AssociativeContainer.html . Time Complexity In the following description of the time complexity for various operations, we use E/V inside of the ``big-O'' notation to express the length of an out-edge list. Strictly speaking this is not accurate because E/V merely gives the average number of edges per vertex in a random graph. The worst-case number of out-edges for a vertex is V (unless it is a multi-graph). For sparse graphs E/V is typically much smaller than V and can be considered a constant. * * edge() The time complexity for this operation is O(E/V) when the EdgeList type is a Sequence http://www.sgi.com/tech/stl/Sequence.html and it is O(log(E/V)) when the EdgeList type is an AssociativeContainer http://www.sgi.com/tech/stl/AssociativeContainer.html . Doesn't the above man entry mean that the edges of a vertex are already ordered when using Assoc. Cont. ? Or are you saying, "insert using sequence, then finally sort the sequence before proceeding to next stage of usage" ? That would be efficient for many applications, but doesn't look possible off-the-shelf. Craig Hicks Louis Lavery wrote:
Hi,
Is it possible to order the edges of a vertex of a boost graph?
From what I can glean from the BGL documentation, I guess the answer will be "No, but may be some time in the future". I so, how soon in the future?
Thanks,
Louis.
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
[Non-text portions of this message have been removed]
Actually, the answer is "yes, if you do a little work". The adjacency_list
is customizable, you can specify what kind of container it will use to store
the out-edge lists for each vertex. If you choose a container type that
sorts its elements (perhaps std::set or some sorted vector) then you will
have what you need. The customization of adjacency_list is through the
container_gen traits class. There's a little in the online docs and the
book about this. If you get stuck let me know.
Cheers,
Jeremy
--On Monday, May 6, 2002 11:03 AM +0100 Louis Lavery
Hi,
Is it possible to order the edges of a vertex of a boost graph?
From what I can glean from the BGL documentation, I guess the answer will be "No, but may be some time in the future". I so, how soon in the future?
Thanks,
Louis.
----- Original Message -----
From: Jeremy Siek
Actually, the answer is "yes, if you do a little work". The adjacency_list is customizable, you can specify what kind of container it will use to
store
the out-edge lists for each vertex. If you choose a container type that sorts its elements (perhaps std::set or some sorted vector) then you will have what you need. The customization of adjacency_list is through the container_gen traits class. There's a little in the online docs and the book about this. If you get stuck let me know.
Cheers, Jeremy
Thanks Jeremy (and to Craig Hicks). I guess I skimmed the documentation too lightly. I'll go and buy the book. Thanks again, Louis.
Louis Lavery wrote:
Hi,
Is it possible to order the edges of a vertex of a boost graph?
From what I can glean from the BGL documentation, I guess the answer will be "No, but may be some time in the future". I so, how soon in the future?
Thanks,
Louis.
If you use an ordered container like list<> or deque<> for the edge-list, won't the edge-iterator return the edges in the order in which you put them in? Jive
BGL support the ordered edges. Please use setS as the edge selector in the
adjacency_list template. The online doc (or BGL book) has more details.
----- Original Message -----
From: "Jive Dadson"
Louis Lavery wrote:
Hi,
Is it possible to order the edges of a vertex of a boost graph?
From what I can glean from the BGL documentation, I guess the answer will be "No, but may be some time in the future". I so, how soon in the future?
Thanks,
Louis.
If you use an ordered container like list<> or deque<> for the edge-list, won't the edge-iterator return the edges in the order in which you put them in?
Jive
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
participants (5)
-
hicks
-
Jeremy Siek
-
Jive Dadson
-
Louis Lavery
-
Rich Lee