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

EigenVector Centrality is giving null, if first node's degree is 0 #4847

Closed
iandecks45 opened this issue Jun 17, 2015 · 2 comments
Closed

EigenVector Centrality is giving null, if first node's degree is 0 #4847

iandecks45 opened this issue Jun 17, 2015 · 2 comments

Comments

@iandecks45
Copy link

Hi there,

I am using neo4j-graph-algo-2.2.2 library for EigenVector centrality. But, I guess there is a bug. For example, if your first node (or vertex) is not connected to others (degree is 0), the calculation is giving null exception. There is something with first node's degree.

Please help me

NodeID Degree
1 0
2 1
4 3
Exception in thread "main" java.lang.NullPointerException
at org.neo4j.graphalgo.impl.centrality.EigenvectorCentralityPower.runIterations(EigenvectorCentralityPower.java:180)
at org.neo4j.graphalgo.impl.centrality.EigenvectorCentralityPower.calculate(EigenvectorCentralityPower.java:126)
at org.neo4j.graphalgo.impl.centrality.EigenvectorCentralityPower.getCentrality(EigenvectorCentralityPower.java:93)
at neo4j.Neo4jEssentials.getEigenVectorCentralityForAllNodes(Neo4jEssentials.java:304)
at neo4j.ShortestPathTest.runEverythingResults(ShortestPathTest.java:124)
at neo4j.ShortestPathTest.main(ShortestPathTest.java:50)

@jexp
Copy link
Member

jexp commented Jul 6, 2015

I reported it to the team, but if you have time and the means we would also be happy about a pull request.

burqen added a commit to burqen/neo4j-public that referenced this issue Jul 22, 2015
burqen added a commit to burqen/neo4j-public that referenced this issue Jul 22, 2015
burqen added a commit to burqen/neo4j-public that referenced this issue Jul 23, 2015
…ted nodes

Refactored EigenvectorCentralityPower and Arnoldi to use common abstract class.

Issue neo4j#4847
@burqen burqen closed this as completed Oct 18, 2017
@burqen
Copy link
Contributor

burqen commented Oct 18, 2017

Issue solved by #5018

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

4 participants