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

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.IterativeProcess
      extended by edu.uci.ics.jung.algorithms.importance.AbstractRanker
          extended by edu.uci.ics.jung.algorithms.importance.BaryCenter

public class BaryCenter
extends AbstractRanker

A simple node importance ranker based on the total shortest path of the node. More central nodes in a connected component will have smaller overall shortest paths, and 'peripheral' nodes on the network will have larger overall shortest paths. Runing this ranker on a graph with more than one connected component will arbitarily mix nodes from both components. For this reason you should probably run this ranker on one component only (but that goes for all rankers).

A simple example of usage is:

 BaryCenter ranker = new BaryCenter(someGraph);
 ranker.evaluate();
 ranker.printRankings();
 

Author:
Dan Bolser, Scott White

Field Summary
static String KEY
           
 
Fields inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
DEFAULT_EDGE_WEIGHT_KEY
 
Constructor Summary
BaryCenter(Graph g)
          Constructor which initializes the algorithm
 
Method Summary
protected  double evaluateIteration()
          Evaluate the result of the current interation.
 String getRankScoreKey()
          The user datum key used to store the rank score.
 
Methods inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
assignDefaultEdgeTransitionWeights, finalizeIterations, getEdgeWeight, getEdgeWeightKeyName, getGraph, getRankings, getRankScore, getRankScores, getVertices, initialize, isRankingEdges, isRankingNodes, normalizeEdgeTransitionWeights, normalizeRankings, onFinalize, printRankings, reinitialize, setEdgeWeight, setNormalizeRankings, setRankScore, setRemoveRankScoresOnFinalize, setUserDefinedEdgeWeightKey
 
Methods inherited from class edu.uci.ics.jung.algorithms.IterativeProcess
evaluate, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, hasConverged, initializeIterations, relativePrecision, setDesiredPrecision, setMaximumIterations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY

public static final String KEY
See Also:
Constant Field Values
Constructor Detail

BaryCenter

public BaryCenter(Graph g)
Constructor which initializes the algorithm

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

evaluateIteration

protected double evaluateIteration()
Description copied from class: IterativeProcess
Evaluate the result of the current interation.

Specified by:
evaluateIteration in class IterativeProcess
Returns:
the estimated precision of the result.

getRankScoreKey

public String getRankScoreKey()
Description copied from class: AbstractRanker
The user datum key used to store the rank score.

Specified by:
getRankScoreKey in class AbstractRanker
Returns:
the key