fkling / JSNetworkX

Build, process and analyze graphs in JavaScript (port of NetworkX)
https://felix-kling.de/jsnetworkx/
Other
761 stars 184 forks source link

Error while computing eigenvectorCentrality #55

Open arjun010 opened 8 years ago

arjun010 commented 8 years ago

Hi, I am trying to use jsnx for a project. I am successfully able to maintain and update the graph data structure and use the ported functions to get the values I need. However, when trying to compute the eigenvectorCentrality, I get the following error:

"Uncaught #" (jsnetworkx.js - Line 2)

I can't figure what the issue is since other functions seem to be working just fine with the same graph. This is the syntax I am using

jsnx.eigenvectorCentrality(networkXGraph)

where networkXGraph holds the graph I am using.

Any help with this would be greatly appreciated.

arjun010 commented 8 years ago

The following line in the source seems to be line causing the issue:

throw new c.JSNetworkXError("eigenvectorCentrality(): power iteration failed to converge in " + (n + " iterations."))