Yifeng Zhang - 2012-12-04

My program crashed when calling the getVertexScore() function of ClosenessCentrality. A null pointer exception is reported. Please see both below. I can run BetweennessCentrality, PageRank without any problem. I found a thread on this in the forum that was posted several years ago. It seems there is a solution, but the instruction wasn't complete. Any help will be appreciated!

ClosenessCentrality closenessScorer = new ClosenessCentrality(socialNetworkJung);
for (User user : socialNetworkJung.getVertices()) {
closenessMap.put(user, closenessScorer.getVertexScore(user));

java.lang.NullPointerException
at edu.uci.ics.jung.algorithms.scoring.DistanceCentralityScorer.getVertexScore(DistanceCentralityScorer.java:194)

Yifeng Zhang
Univ. of Illinois at Springfield