Home>
Hello everyone! There is a nonoriented unbelievable graph ... I want to find the shortest path between the two vertices ... I understand you need to use the algorithm search in width ... For solving the problem, I use Boost BGL ... The Breadth _first Search, and that this algorithm searches for the shortest path, you need to write a class visitor who is inherited from Boost :: Default < em>_ bfs ____ Visitor ... How to implement this class to show the shortest path between the two vertices? Send an example or link to any article or book (not "c++ Boost Graph Library only. Programmer's library")!

Answer # 1
And what didn't you please the book "c++ Boost Graph Library. Library of a programmer"? There may be everything very confused at first glance, but if it is a little tinker, then things become clearer. Also, in my opinion, there is very good Wiki.By BGL, once even used her. So, in this documentation there is an example of the application of a visitor inherited from Default_dfs_visitor BreadthfirstSearch.cpp
I once again helped on this forum well, so you can.