|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.HITS<V,E>
HITS
.
public class HITS<V,E>
Calculates the "hubs-and-authorities" importance measures for each node in a graph. These measures are defined recursively as follows:
Note: This algorithm uses the same key as HITSWithPriors for storing rank sccores.
A simple example of usage is:
HITS ranker = new HITS(someGraph); ranker.evaluate(); ranker.printRankings();
Running time: O(|V|*I) where |V| is the number of vertices and I is the number of iterations until convergence
Field Summary | |
---|---|
protected static String |
AUTHORITY_KEY
Deprecated. |
protected static String |
HUB_KEY
Deprecated. |
Fields inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker |
---|
edgeRankScores, vertexRankScores |
Constructor Summary | |
---|---|
HITS(Graph<V,E> graph)
Deprecated. Constructs an instance of the ranker where the type of importance that is associated with the rank score is the node's importance as an authority. |
|
HITS(Graph<V,E> graph,
boolean useAuthorityForRanking)
Deprecated. Constructs an instance of the ranker where the type of importance that is associated with the rank score is the node's importance as an authority. |
Method Summary | |
---|---|
protected void |
finalizeIterations()
Deprecated. Perform eventual clean-up operations (must be implement by subclass when needed). |
protected double |
getPreviousAuthorityScore(V v)
Deprecated. |
protected double |
getPreviousHubScore(V v)
Deprecated. |
Object |
getRankScoreKey()
Deprecated. the user datum key used to store the rank scores |
double |
getVertexRankScore(V v)
Deprecated. Given a node, returns the corresponding rank score. |
protected void |
initialize(Graph<V,E> g)
Deprecated. |
void |
setUseAuthorityForRanking(boolean useAuthorityForRanking)
Deprecated. If evaluate() has not already been called, the user can override the type of importance. |
void |
step()
Deprecated. Evaluate the result of the current iteration. |
protected void |
updateAuthorityRankings()
Deprecated. |
protected void |
updateHubRankings()
Deprecated. |
protected void |
updatePreviousScores()
Deprecated. |
Methods inherited from class edu.uci.ics.jung.algorithms.util.IterativeProcess |
---|
done, evaluate, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, getStatus, hasConverged, initializeIterations, relativePrecision, setDesiredPrecision, setMaximumIterations, setPrecision |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String AUTHORITY_KEY
protected static final String HUB_KEY
Constructor Detail |
---|
public HITS(Graph<V,E> graph, boolean useAuthorityForRanking)
graph
- the graph whose nodes are to be rankeduseAuthorityForRanking
- public HITS(Graph<V,E> graph)
graph
- the graph whose nodes are to be rankedMethod Detail |
---|
protected void initialize(Graph<V,E> g)
protected void finalizeIterations()
IterativeProcess
finalizeIterations
in class AbstractRanker<V,E>
public Object getRankScoreKey()
getRankScoreKey
in class AbstractRanker<V,E>
public double getVertexRankScore(V v)
getRankScore
assumes
the decoration representing the rank score is of type MutableDouble
.
getVertexRankScore
in class AbstractRanker<V,E>
protected double getPreviousAuthorityScore(V v)
protected double getPreviousHubScore(V v)
public void step()
IterativeProcess
step
in interface IterativeContext
step
in class IterativeProcess
public void setUseAuthorityForRanking(boolean useAuthorityForRanking)
evaluate()
has not already been called, the user can override the type of importance.
(hub or authority) that should be associated with the rank score.
useAuthorityForRanking
- if true
, authority is used; if false
, hub is usedprotected void updateAuthorityRankings()
protected void updateHubRankings()
protected void updatePreviousScores()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |