ContainsEdge() with UndirectedGraph not recognizing reverse direction

Topics: bug, graph
Sep 26, 2011 at 7:50 PM

Hi all!

This may be a problem:

            var g = new UndirectedGraph<int, UndirectedEdge<int>>();

            g.AddVerticesAndEdge(new UndirectedEdge<int>(1, 2));

            var c = g.ContainsEdge(2, 1); // false
The last line returns false, however since this is an undirected graph, IMHO should really return true. Am I wrong?

Coordinator
Nov 20, 2011 at 3:30 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Nov 20, 2011 at 3:30 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.