Re: [jgrapht-users] Bidirectional Edges
Brought to you by:
barak_naveh,
perfecthash
From: John V. S. <js...@gm...> - 2009-03-04 08:03:02
|
Bhavesh Sanghvi wrote: > I am interested in a digraph which may also contain bidirectional edges > (preferably with weight). Later, I wish to detect cycles this graph > (specifically for this reason, I cannot use two directional edges as > they would be identified in the cycle). > > > > Please let me know if it is possible to create such a graph using > JGraphT. I searched for bidirectional edges, however, was not able to > find it. Hi Bhavesh, Following the Mathworld definition, http://mathworld.wolfram.com/DirectedGraph.html a bidirectional edge is equivalent to a pair of oppositely-directed edges. The ability to mix directed with undirected edges in the same graph isn't something we're planning to add since it is an uncommon requirement and would complicate the internals considerably. Perhaps you could you can write a modified version of the cycle detector which ignores cycles of length 2? JVS |