Class RandomWalkBetweenness<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.util.IterativeProcess
-
- edu.uci.ics.jung.algorithms.importance.AbstractRanker<V,E>
-
- edu.uci.ics.jung.algorithms.importance.RandomWalkSTBetweenness<V,E>
-
- edu.uci.ics.jung.algorithms.importance.RandomWalkBetweenness<V,E>
-
- All Implemented Interfaces:
IterativeContext
public class RandomWalkBetweenness<V,E> extends RandomWalkSTBetweenness<V,E>
Computes betweenness centrality for each vertex in the graph. The betweenness values in this case are based on random walks, measuring the expected number of times a node is traversed by a random walk averaged over all pairs of nodes. The result is that each vertex has a UserData element of type MutableDouble whose key is 'centrality.RandomWalkBetweennessCentrality' A simple example of usage is:
RandomWalkBetweenness ranker = new RandomWalkBetweenness(someGraph);
ranker.evaluate();
ranker.printRankings();Running time is: O((m+n)*n^2).
- See Also:
- "Mark Newman: A measure of betweenness centrality based on random walks, 2002."
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CENTRALITY
-
Fields inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
edgeRankScores, vertexRankScores
-
-
Constructor Summary
Constructors Constructor Description RandomWalkBetweenness(edu.uci.ics.jung.graph.UndirectedGraph<V,E> g)
Constructor which initializes the algorithm
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
computeBetweenness()
protected double
evaluateIteration()
java.lang.String
getRankScoreKey()
the user datum key used to store the rank scores-
Methods inherited from class edu.uci.ics.jung.algorithms.importance.RandomWalkSTBetweenness
computeSTBetweenness, getIndexer, getVoltageMatrix, setUp, step
-
Methods inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
assignDefaultEdgeTransitionWeights, finalizeIterations, getEdgeRankScore, getEdgeRankScore, getEdgeRankScores, getEdgeRankScores, getEdgeWeight, getEdgeWeights, getGraph, getRankings, getRankScores, getVertexCount, getVertexRankScore, getVertexRankScore, getVertexRankScores, getVertexRankScores, getVertices, initialize, isRankingEdges, isRankingNodes, normalizeEdgeTransitionWeights, normalizeRankings, onFinalize, printRankings, removeEdgeRankScore, removeEdgeRankScore, removeVertexRankScore, removeVertexRankScore, reset, setEdgeRankScore, setEdgeRankScore, setEdgeWeight, setEdgeWeights, setNormalizeRankings, setRemoveRankScoresOnFinalize, setVertexRankScore, setVertexRankScore
-
Methods inherited from class edu.uci.ics.jung.algorithms.util.IterativeProcess
done, evaluate, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, hasConverged, initializeIterations, relativePrecision, setDesiredPrecision, setMaximumIterations, setPrecision
-
-
-
-
Field Detail
-
CENTRALITY
public static final java.lang.String CENTRALITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
computeBetweenness
protected void computeBetweenness()
- Overrides:
computeBetweenness
in classRandomWalkSTBetweenness<V,E>
-
getRankScoreKey
public java.lang.String getRankScoreKey()
the user datum key used to store the rank scores- Overrides:
getRankScoreKey
in classRandomWalkSTBetweenness<V,E>
- Returns:
- the key
-
evaluateIteration
protected double evaluateIteration()
-
-