[BGL] Detection of cycles in graphs
This is a repost - I sent it last friday but it hasn't shown up, so I'll try again: Is there an algorithm implemented in BGL that detects whether a directed graph contains cycles or not? If not, what would be the best way to implement such an algorithm? Thanks, Erik
Hi Erik, On Mon, 29 Jul 2002, Erik Arner wrote: yg-boo> yg-boo> Is there an algorithm implemented in BGL that detects whether a yg-boo> directed graph contains cycles or not? If not, what would be the yg-boo> best way to implement such an algorithm? Yes, it is called depth-first search. See the "Cyclic Dependencies" section of http://www.boost.org/libs/graph/doc/file_dependency_example.html and the example file libs/graph/example/file_dependencies.cpp Cheers, Jeremy ---------------------------------------------------------------------- Jeremy Siek http://php.indiana.edu/~jsiek/ Ph.D. Student, Indiana Univ. B'ton email: jsiek@osl.iu.edu C++ Booster (http://www.boost.org) office phone: (812) 855-3608 ----------------------------------------------------------------------
participants (2)
-
Erik Arner
-
Jeremy Siek