edu.uci.ics.jung.algorithms.importance
Class BaryCenter
java.lang.Object
edu.uci.ics.jung.algorithms.IterativeProcess
edu.uci.ics.jung.algorithms.importance.AbstractRanker
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
Constructor Summary |
BaryCenter(Graph g)
Constructor which initializes the algorithm |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY
public static final String KEY
- See Also:
- Constant Field Values
BaryCenter
public BaryCenter(Graph g)
- Constructor which initializes the algorithm
- Parameters:
g
- the graph whose nodes are to be analyzed
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