From: SourceForge.net <no...@so...> - 2012-12-04 21:53:48
|
The following forum message was posted by yzhang14 at http://sourceforge.net/projects/jung/forums/forum/252062/topic/6373161: 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 |