Class HITS<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.vertex.HITS<U>
- Type Parameters:
U
- Type of the users.
- All Implemented Interfaces:
VertexMetric<U>
public class HITS<U> extends java.lang.Object implements VertexMetric<U>
Computes the HITS values of the different nodes in a graph.
Reference: J.M. Kleinberg. Authoritative sources in a hyperlink environment. Journal of the ACM 46(5), PP. 604-632 (1999)
-
Field Summary
Fields Modifier and Type Field Description private boolean
authorities
Indicates if we want to return authorities or hubs.private java.util.Map<U,java.lang.Double>
auths
Authorities values.private boolean
computed
True if already computed, false if not.private java.util.Map<U,java.lang.Double>
hubs
Hubs values.private int
MAXITER
Maximum number of iterations.private Graph<U>
oldGraph
Last graph which computed the resolution. -
Constructor Summary
Constructors Constructor Description HITS(boolean authorities)
Constructor for not personalized PageRank. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface es.uam.eps.ir.relison.sna.metrics.VertexMetric
averageValue, averageValue, compute
-
Field Details
-
MAXITER
private final int MAXITERMaximum number of iterations.- See Also:
- Constant Field Values
-
authorities
private final boolean authoritiesIndicates if we want to return authorities or hubs. -
oldGraph
Last graph which computed the resolution. -
computed
private boolean computedTrue if already computed, false if not. -
auths
Authorities values. -
hubs
Hubs values.
-
-
Constructor Details
-
HITS
public HITS(boolean authorities)Constructor for not personalized PageRank.- Parameters:
authorities
- true if we want to compute the authorities, false if not.
-
-
Method Details
-
compute
Description copied from interface:VertexMetric
Computes the value of the metric for a single user.- Specified by:
compute
in interfaceVertexMetric<U>
- Parameters:
graph
- The graph.user
- The user to compute.- Returns:
- the value of the metric.
-
compute
Description copied from interface:VertexMetric
Computes the value of the metric for all the users in the graph.- Specified by:
compute
in interfaceVertexMetric<U>
- Parameters:
graph
- The graph.- Returns:
- A map relating the users with the values of the metric.
-