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

Digraph not accurate #317

Open
handav opened this issue Nov 17, 2016 · 0 comments
Open

Digraph not accurate #317

handav opened this issue Nov 17, 2016 · 0 comments

Comments

@handav
Copy link
Contributor

handav commented Nov 17, 2016

I've been trying to work with the EdgeWeightedDigraph, but the number of edges and particularly the vertexes are consistently wrong. With the example code in the README (below), printing digraph.v() and digraph.e() gives me 7 and 6, respectively. The README says they should both be 5, but I would imagine they should both be 6, as there are 6 vertexes and 6 edges. Any direction would be helpful.

var EdgeWeightedDigraph = natural.EdgeWeightedDigraph;
var digraph = new EdgeWeightedDigraph();
digraph.add(5,4,0.35);
digraph.add(5,1,0.32);
digraph.add(1,3,0.29);
digraph.add(6,2,0.40);
digraph.add(3,6,0.52);
digraph.add(6,4,0.93);

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

No branches or pull requests

2 participants