Class RandomWalkSTBetweenness<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>
-
- All Implemented Interfaces:
IterativeContext
- Direct Known Subclasses:
RandomWalkBetweenness
public class RandomWalkSTBetweenness<V,E> extends AbstractRanker<V,E>
/** Computes s-t 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 from s to t. The result is that each vertex has a UserData element of type MutableDouble whose key is 'centrality.RandomWalkBetweennessCentrality' A simple example of usage is:
RandomWalkSTBetweenness ranker = new RandomWalkBetweenness(someGraph,someSource,someTarget);
ranker.evaluate();
ranker.printRankings();Running time is: O(n^3).
- 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.StringCENTRALITY-
Fields inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
edgeRankScores, vertexRankScores
-
-
Constructor Summary
Constructors Constructor Description RandomWalkSTBetweenness(edu.uci.ics.jung.graph.UndirectedGraph<V,E> g, V s, V t)Constructor which initializes the algorithm
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcomputeBetweenness()doublecomputeSTBetweenness(V ithVertex, V source, V target)protected org.apache.commons.collections4.BidiMap<V,java.lang.Integer>getIndexer()java.lang.StringgetRankScoreKey()the user datum key used to store the rank scoresprotected cern.colt.matrix.DoubleMatrix2DgetVoltageMatrix()protected voidsetUp()voidstep()Evaluate the result of the current iteration.-
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
-
getIndexer
protected org.apache.commons.collections4.BidiMap<V,java.lang.Integer> getIndexer()
-
getVoltageMatrix
protected cern.colt.matrix.DoubleMatrix2D getVoltageMatrix()
-
setUp
protected void setUp()
-
computeBetweenness
protected void computeBetweenness()
-
getRankScoreKey
public java.lang.String getRankScoreKey()
the user datum key used to store the rank scores- Specified by:
getRankScoreKeyin classAbstractRanker<V,E>- Returns:
- the key
-
step
public void step()
Description copied from class:IterativeProcessEvaluate the result of the current iteration.- Specified by:
stepin interfaceIterativeContext- Specified by:
stepin classIterativeProcess
-
-