edu.uci.ics.jung.algorithms.importance
Class BetweennessCentrality

java.lang.Object
  extended byedu.uci.ics.jung.algorithms.IterativeProcess
      extended byedu.uci.ics.jung.algorithms.importance.AbstractRanker
          extended byedu.uci.ics.jung.algorithms.importance.BetweennessCentrality

public class BetweennessCentrality
extends AbstractRanker

Computes betweenness centrality for each vertex and edge in the graph. The result is that each vertex and edge has a UserData element of type MutableDouble whose key is 'centrality.RelativeBetweennessCentrality' Note: Many social network researchers like to normalize the betweenness values by dividing the values by (n-1)(n-2)/2. The values given here are unnormalized.

A simple example of usage is:
RelativeBetweennessCentrality ranker = new RelativeBetweennessCentrality(someGraph);
ranker.evaluate();
ranker.printRankings();

Running time is: O(n^2 + nm).

Author:
Scott White
See Also:
"Ulrik Brandes: A Faster Algorithm for Betweenness Centrality. Journal of Mathematical Sociology 25(2):163-177, 2001."

Field Summary
static java.lang.String CENTRALITY
           
 
Fields inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
DEFAULT_EDGE_WEIGHT_KEY
 
Constructor Summary
BetweennessCentrality(Graph g)
          Constructor which initializes the algorithm
BetweennessCentrality(Graph g, boolean rankNodes)
           
 
Method Summary
 java.lang.String getRankScoreKey()
          the user datum key used to store the rank scores
 
Methods inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
getEdgeWeightKeyName, getRankings, getRankScore, getRankScores, isRankingNodes, printRankings, setNormalizeRankings, setRemoveRankScoresOnFinalize, setUserDefinedEdgeWeightKey
 
Methods inherited from class edu.uci.ics.jung.algorithms.IterativeProcess
evaluate, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, hasConverged, relativePrecision, setDesiredPrecision, setMaximumIterations
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CENTRALITY

public static final java.lang.String CENTRALITY
See Also:
Constant Field Values
Constructor Detail

BetweennessCentrality

public BetweennessCentrality(Graph g)
Constructor which initializes the algorithm

Parameters:
g - the graph whose nodes are to be analyzed

BetweennessCentrality

public BetweennessCentrality(Graph g,
                             boolean rankNodes)
Method Detail

getRankScoreKey

public java.lang.String getRankScoreKey()
the user datum key used to store the rank scores

Specified by:
getRankScoreKey in class AbstractRanker
Returns:
the key