Removing edges using remove_edge in adjacency list

Hello All,
I am completely new to using BGL and STL. I know the concept of STL
but had never used it before. I have to implement an algorithm for my thesis
and I am trying to use BGL for that. I have made use of Dijkstra's algorithm
that is inbuilt in BGL. Below is the code, which is similar to that in the
reference manual with few changes.
#include <iostream>
#include ::vertex_iterator vi,vend;
for(tie(vi,vend)=vertices(g);vi!=vend;++vi)
{
std::cout<<"distance("<

On Nov 1, 2010, at 12:29 PM, giridhar wrote:
Now I want to remove the edges that has been found by Dijkstra's algorithm
Care must be taken when removing edges during iteration. Have you read the section on "Iterator and Descriptor Stability/Invalidation" in libs/graph/doc/adjacency_list.html? Trevor

On Monday, 1. November 2010 22:41:12 Trevor Harmon wrote:
On Nov 1, 2010, at 12:29 PM, giridhar wrote:
Now I want to remove the edges that has been found by Dijkstra's algorithm
Care must be taken when removing edges during iteration. Have you read the section on "Iterator and Descriptor Stability/Invalidation" in libs/graph/doc/adjacency_list.html?
For that reason, I would recommend to use a filtered_graph and "hide" the edges instead of removing them. If you have questions about using filtered_graph, please feel free to ask.
Trevor
Best, Cedric
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Cedric Laczny
-
giridhar
-
Trevor Harmon