[graph] adjacency_list with edges in mulitsetS does not seem to sort

Hello!
I'm trying to use boost::graph's adjacency_list
This function only works when the OutEdgeList for the adjacency_list is a container that sorts the out edges according to target vertex, and allows for parallel edges. The multisetS selector chooses such a container.
Attached you find a small program demonstrating a case where edges do not seem to get sorted accordingly. The last comment in the program contains a sample output. * The line below "All edges" shows the sequence of all edges. It does not seem to be sorted in the specified way. Probably as a consequnce of this, edge_range() does not work as expected: * The last line of the output is generated by using edge_range(). It should output edges from node 1 to node 0. There is only one such edge. Instead of that, edges (1,2) and (1,0) are returned. Am I using the interface in a wrong way or is there an error in the implementation of adjacency_list<>? Thank you in advance for any comment or advice. Carsten Scholtes

--- Carsten Scholtes wrote:
Hello!
I'm trying to use boost::graph's adjacency_list
. The documentation ( boost_1_33_1/libs/graph/doc/adjacency_list.html ) states for the function edge_range(): This function only works when the OutEdgeList for the adjacency_list is a container that sorts the out edges according to target vertex, and allows for parallel edges. The multisetS selector chooses such a container.
Edge selector comes before vertex selector, so perhaps
you meant adjacency_list

I'm trying to use boost::graph's adjacency_list
. The documentation ( boost_1_33_1/libs/graph/doc/adjacency_list.html ) states for the function edge_range(): This function only works when the OutEdgeList for the adjacency_list is a container that sorts the out edges according to target vertex, and allows for parallel edges. The multisetS selector chooses such a container.
Edge selector comes before vertex selector, so perhaps you meant adjacency_list
Thank you very much for the quick help and pointing this out. Now, it works. Sorry to have taken your time for such a simple issue. Carsten Scholtes
participants (2)
-
Carsten Scholtes
-
Cromwell Enage