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

Sinks method returns incorrect output for undirected graph #101

Open
lynxaegon opened this issue Apr 23, 2019 · 0 comments · May be fixed by #102
Open

Sinks method returns incorrect output for undirected graph #101

lynxaegon opened this issue Apr 23, 2019 · 0 comments · May be fixed by #102

Comments

@lynxaegon
Copy link

Hi,

{ options: { directed: false, multigraph: false, compound: false },
  nodes:
   [ { v: 'a' },
     { v: 'b' },
     { v: 'c' },
     { v: 'd' } ],
  edges:
   [ { v: 'a', w: 'b' }, { v: 'b', w: 'c' }, { v: 'c', w: 'd' } ] }

This is how i define the graph:

var g = new graphlib.Graph({
	directed: false
});

g.setEdge("a", "b");
g.setEdge("b", "c");
g.setEdge("c", "d");
g.sinks() -> returns "d"

The graph is undirected, wouldn't that mean that "d" is connected to "c"?

@lynxaegon lynxaegon linked a pull request Apr 24, 2019 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant