Boost logo

Boost Users :

From: Christian Sturz (linuxkaffee_at_[hidden])
Date: 2008-02-16 10:07:22


Hi,

I'm looking for an appropriate Boost Graph algorithm for the following
problem:

my graph (based on adjacency_list) represents the control-flow graph
of a program where each vertex is a statement and the control-flow
relations between the statements are modeled by edges. Now I'm looking
for an algorithm that finds all vertices that can be reached from a
defined statement. So, what I need is a back-traversal of the graph,
from the given vertex to all predecessors and so forth.

I didn't find any algorithm in the Boost Graph Library. The "strong_components" algorithm might be OK since it assumes a directed graph
(as is mine) but the algorithm seems to operate in the direction of the
directed edges. Obviously I need the the opposite direction.

Do you know any approach/algorithm that might solve my problem?

Regards,
Chris

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net