I need to avoid pushing a vertex into the queue if it doesn't fit a certain condition, thus preventing further search on its neighbours. What should I write in my custom visitor, or should I modify something elsewhere? Codes in detail will be appreciated.
Asked
Active
Viewed 96 times
1
-
1"Codes in detail will be appreciated." is a very funny constraint given the complete lack of code in the question – sehe Sep 23 '15 at 07:02
-
Do you mean you don't want to traverse a node at all? Are you looking for a path or for a target? – sehe Sep 23 '15 at 07:04
-
I'm not looking for a path nor a target. I just want to "expand" from the source vertex to the maximum extent. I will do some other job in the visitor. – Aurus Huang Sep 23 '15 at 07:30
-
@sehe See my recent answer for update, if it doesn't bother. – Aurus Huang Oct 15 '15 at 03:35
1 Answers
-1
I used an alternative solution: Rewrite the BFS algorithm instead of inherit one from Boost. The original BFS code in Boost is simple to understand that even I can copy and modify from it.

Aurus Huang
- 372
- 1
- 3
- 17