Boost logo

Boost Users :

Subject: [Boost-users] [BGL] Modifying graph in BFS
From: Michal Sekletar (sekletar.m_at_[hidden])
Date: 2011-04-16 07:56:29


Hello everyove,

I have a question about BGL. I want to traverse through graph using BFS and before actual algorithm I want to remove from graph structure (adjacency_list) some vertices and all edges connected to these vertices, so I wrote my own visitor class and implemented initliaze_vertex method to do check on every vertex (it's property) if it's satisfied then I iterate through all edges in graph and i store iterators to edges - edge must be connected to current vertex. Then I want to remove these edges and vertex itself. I store edge iterators for edges connected to vertex I want to remove, because I understand that calling remove_edge directly, while iterating through edges will lead to undefined behavior (if edges are stored in vector - removing invalidates iterators).
My problem is that I can't compile source file, compiler is complaining about template instantiation(error message is very long and I don't understand what is cause of the problem)
Any ideas, suggestions, code snippets, how to solve this issue would be much appreciated.

Thank you

Michal Sekletar


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