At 13:12 14/08/2003 -0400, you wrote:
From: Jonathan de Halleux <[EMAIL PROTECTED]> > I have a tree built with the BGL. I want to find the root of the tree. > > Has anybody an idea on the algorithm I should be using ? thks
Assuming your graph is bidirectional and has a single root, then you should just be able to pick any node, pick any parent thereof, repeat until you deadend. that is the root.
?
Joel
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
----------------------------------------------------------------------------------- Jonathan de Halleux, Research Assistant Center for Systems Engineering and Applied Mechanics (CESAME) Universite catholique de Louvain Batiment Euler , Av. Georges Lemaitre, 4 Tel : +32-10-47 2595 B-1348 Louvain-la-Neuve Belgium E-mail : [EMAIL PROTECTED] -----------------------------------------------------------------------------------
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost