Package edu.uci.ics.jung.algorithms.importance

Provides a set of algorithms for computing the importance of each node (or edge) in a graph relative to all others (or, for the algorithms that inherit from RelativeAuthorityRanker, relative to a specified subset of elements).

See: Description

Package edu.uci.ics.jung.algorithms.importance Description

Provides a set of algorithms for computing the importance of each node (or edge) in a graph relative to all others (or, for the algorithms that inherit from RelativeAuthorityRanker, relative to a specified subset of elements).

Currently, all the ranking (authority) algorithms derive from AbstractRanker. A typical use of one of these algorithms follows:

AbstractRanker ranker = new DegreeDistributionRanker(graph, true);
ranker.evaluate();
List rankingList = ranker.getRankings();
The first command creates the ranking algorithm instance for the specified graph, with the true flag indicating that the algorithm is to rank nodes according to their indegree (as opposed to their outdegree). The second command causes the ranks to be calculated, and the final command retrieves the calculated ranks. The ranks may also be retrieved for a specific elements e by calling getRankScore(e) (although see below).

In the process of calculating the ranks for each element, the elements' UserData repositories are decorated with their rank score, with a user-specified key or with a default key based on the class. By default, these decorations are removed when the evaluation step has completed, and the user only has access to the list of rankings. If you wish to be able to fetch individual scores using getRankScore, you must call

ranker.setRemoveRankScoresOnFinalize(false);
before calling evaluate().

Some of these algorithms normalize the rank scores that they calculate (so that the scores for all edges, or all vertices, will sum to 1), but some do not; check the documentation for each algorithm for details.