I need functions that find a loop in an undirected graph (boost) and return its vertices and edges. He only needs to return the vertices / edges of one cycle in the graph. My question is: what is the best way to do this with boost? I do not experience this.
If you want to find the cycle a , then the depth search should be perfect first. The DFS visitor has a back_edge function. When it is called, you have an edge in the loop. Then you can view the map of the predecessor to restore the cycle. Note:
strong_components
Boost, S.O. :
: BFS. node "" "" ( , ). , A B ( B ), : 1) A , / . 2) B , / . 3) A, B, AB 4) "", . LIFO () 1) FIFO 2)
, .
You can usually do this with a depth search. I am not familiar with the advanced GUI features, but this page will give you an overview of the algorithm.
Source: https://habr.com/ru/post/1725958/More articles:[AZ] {2,4}, without restricting between 2 and 4 characters - javascriptEclipse plugins: how to add a group to the popup context menu? - eclipseDoes ImageIO view implied anti-aliasing? - javaIndexing Selenium Results - pythonJava synchronization games: synchronized && wait && notify - javaHow to merge a branch into another with the override option in git - gitManage initial switch status (and layout?) IPhone keyboards from web form - iphoneHow to test cross-domain assemblies locally? - dojodojo.requireIf does not allow local variables - dojoLua Links in Lua - garbage-collectionAll Articles