From: Szabolcs B. <bes...@gm...> - 2014-11-03 12:31:42
|
Given the problem a little bit more thought I think what you are trying to achieve is the same as determining the strongly connected components <http://en.wikipedia.org/wiki/Strongly_connected_component> of a given directed graph. The strongly connected components of an arbitrary directed graph form a partition into subgraphs that are themselves strongly connected. So the functionality of org.jgrapht.alg.StrongConnectivityInspector<V, E> meets the requirements of your problem. Regards, Szabolcs 2014-11-03 12:58 GMT+01:00 Davide Cavestro <dav...@gm...>: > Thankyou for the quick hint... but It seems that org.jgrapht.alg.ConnectivityInspector#pathExists > ignores edges direction (as it is based on > org.jgrapht.alg.ConnectivityInspector#connectedSetOf) > Is there any way to determine the set of paths reachable from a given > vertex of a directed graph? This way I could use the results to create a > DirectedSubGraph > > 2014-11-01 1:04 GMT+01:00 Szabolcs Besenyei <bes...@gm...>: > >> >> >> 2014-10-31 18:23 GMT+01:00 Davide Cavestro <dav...@gm...>: >> > I'm trying to figure out a way to extract from a DirectedGraph instance >> a >> > DirectedSubgraph containing only the subset of vertex/edges reachable >> from a >> > given vertex (of the original graph). >> > Any help appreciated. >> >> Ta >> ke a look at org.jgrapht.alg.ConnectivityInspector#pathExists. >> >> -- >> Regards, >> >> Szabolcs >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> jgrapht-users mailing list >> jgr...@li... >> https://lists.sourceforge.net/lists/listinfo/jgrapht-users >> >> > |