QuickGraph icon indicating copy to clipboard operation
QuickGraph copied to clipboard

UndirectedGraph.ContainsEdge() should be "undirected"

Open Shujee opened this issue 4 years ago • 0 comments

The following test fails:

    [TestMethod]
    public void UndirectednessTest()
    {
      UndirectedGraph<string, TaggedUndirectedEdge<string, int>> graph = new UndirectedGraph<string, TaggedUndirectedEdge<string, int>>();

      graph.AddVertex("A");
      graph.AddVertex("B");

      var Edge = new TaggedUndirectedEdge<string, int>("A", "B", 10);
      graph.AddEdge(Edge);

      Assert.IsTrue(graph.ContainsEdge("A", "B"));
      Assert.IsTrue(graph.ContainsEdge("B", "A"));
    }

It thinks that there is no edge between B and A, even though this is an undirected graph. Or am I missing something?

Shujee avatar Oct 08 '19 16:10 Shujee