edu.uci.ics.jung.algorithms.importance
Class DegreeDistributionRanker

java.lang.Object
  extended byedu.uci.ics.jung.algorithms.IterativeProcess
      extended byedu.uci.ics.jung.algorithms.importance.AbstractRanker
          extended byedu.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
           
 
Fields inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
DEFAULT_EDGE_WEIGHT_KEY
 
Constructor Summary
DegreeDistributionRanker(Graph graph)
          Default constructor which assumes if the graph is directed the indegree is to be used.
DegreeDistributionRanker(Graph graph, boolean useInDegree)
          This constructor allows you to specify whether to use indegree or outdegree.
 
Method Summary
 java.lang.String getRankScoreKey()
          The user datum key used to store the rank score.
 
Methods inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
getEdgeWeightKeyName, getRankings, getRankScore, getRankScores, isRankingNodes, printRankings, setNormalizeRankings, setRemoveRankScoresOnFinalize, setUserDefinedEdgeWeightKey
 
Methods inherited from class edu.uci.ics.jung.algorithms.IterativeProcess
evaluate, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, hasConverged, relativePrecision, setDesiredPrecision, setMaximumIterations
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY

public static final java.lang.String KEY
See Also:
Constant Field Values
Constructor Detail

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 based
useInDegree - if true, indicates indegree is to be used, if false outdegree
Method Detail

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