edu.uci.ics.jung.algorithms.importance
Class DegreeDistributionRanker
java.lang.Object
edu.uci.ics.jung.algorithms.IterativeProcess
edu.uci.ics.jung.algorithms.importance.AbstractRanker
edu.uci.ics.jung.algorithms.importance.DegreeDistributionRanker
- public class DegreeDistributionRanker
- extends AbstractRanker
A simple node importance ranker based on the degree of the node. The user can specify whether s/he wants
to use the indegree or the outdegree as the metric. If the graph is undirected this option is effectively
ignored. So for example, if the graph is directed and the user chooses to use in-degree, nodes with the highest
in-degree will be ranked highest and similarly nodes with the lowest in-degree will be ranked lowest.
A simple example of usage is:
DegreeDistributionRanker ranker = new DegreeDistributionRanker(someGraph);
ranker.evaluate();
ranker.printRankings();
- Author:
- Scott White
Field Summary |
static java.lang.String |
KEY
|
Method Summary |
java.lang.String |
getRankScoreKey()
The user datum key used to store the rank score. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY
public static final java.lang.String KEY
- See Also:
- Constant Field Values
DegreeDistributionRanker
public DegreeDistributionRanker(Graph graph)
- Default constructor which assumes if the graph is directed the indegree is to be used.
- Parameters:
graph
- the graph whose nodes are to be ranked based on indegree
DegreeDistributionRanker
public DegreeDistributionRanker(Graph graph,
boolean useInDegree)
- This constructor allows you to specify whether to use indegree or outdegree.
- Parameters:
graph
- the graph whose nodes are to be ranked baseduseInDegree
- if true
, indicates indegree is to be used, if false
outdegree
getRankScoreKey
public java.lang.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