Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UndirectedGraph.ContainsEdge() should be "undirected" #196

Open
Shujee opened this issue Oct 8, 2019 · 0 comments
Open

UndirectedGraph.ContainsEdge() should be "undirected" #196

Shujee opened this issue Oct 8, 2019 · 0 comments

Comments

@Shujee
Copy link

Shujee commented Oct 8, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant