edu.uci.ics.jung.algorithms.importance
Class RandomWalkSTBetweenness
java.lang.Object
edu.uci.ics.jung.algorithms.IterativeProcess
edu.uci.ics.jung.algorithms.importance.AbstractRanker
edu.uci.ics.jung.algorithms.importance.RandomWalkSTBetweenness
- Direct Known Subclasses:
- RandomWalkBetweenness
- public class RandomWalkSTBetweenness
- extends AbstractRanker
/**
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).
- Author:
- Scott White
- See Also:
- "Mark Newman: A measure of betweenness centrality based on random walks, 2002."
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CENTRALITY
public static final java.lang.String CENTRALITY
- See Also:
- Constant Field Values
RandomWalkSTBetweenness
public RandomWalkSTBetweenness(UndirectedGraph g,
Vertex s,
Vertex t)
- Constructor which initializes the algorithm
- Parameters:
g
- the graph whose nodes are to be analyzeds
- the source vertext
- the target vertex
computeSTBetweenness
public double computeSTBetweenness(Vertex ithVertex,
Vertex source,
Vertex target)
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