Boost logo

Boost Users :

Subject: Re: [Boost-users] About "transitive_closure" method of Boost graph.
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-06-04 11:01:24


Amanullah Yasin wrote:

> Bonjour
> Dear
>
> I want to check whether there is a directed path between two given nodes (A
> and C) using Boost graph.

If you want to do this once, for specific A and C, there's no need to use
transitive_closure -- DFS will be fine.

> I also want to access intermediate edges to
> examine PDAG properties.

The predecessor map returned by DFS will be handy for that.

> I test
>
> void transitive_closure(const Graph& g, GraphTC& tc) method. But i
> want to check between two given nodes.
>
>
> Now i want to ask you
>
> -
>
>
> void transitive_closure(const Graph& g, GraphTC& tc,
>
>
>
> G_to_TC_VertexMap g_to_tc_map, VertexIndexMap index_map)
>
> In the above method, how i can declare
>
>
> G_to_TC_VertexMap g_to_tc_map, VertexIndexMap index_map?
>
> http://www.boost.org/doc/libs/1_39_0/libs/graph/doc/transitive_closure.html

There's test case, you can check that.

> - How i can examine the intermediate edges? or is there any other easy
> way?

This information is not returned by transitive_closure algorithm; I cannot
immediately say if it can be modified to report that in any form.

- Volodya


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