Class ComplementaryPageRank<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.complementary.vertex.ComplementaryPageRank<U>
- Type Parameters:
U
- type of the nodes.
- All Implemented Interfaces:
VertexMetric<U>
public class ComplementaryPageRank<U> extends java.lang.Object implements VertexMetric<U>
Computes the PageRank values in the complementary graph for the different nodes in the graph.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ComplementaryPageRank(double r)
Constructor (for not personalized PageRank).ComplementaryPageRank(double r, U u)
Constructor (for personalized PageRank) -
Method Summary
Modifier and Type Method Description double
averageValue(Graph<U> graph)
Computes the average value of the metric in the graph.java.util.Map<U,java.lang.Double>
compute(Graph<U> graph)
Computes the value of the metric for all the users in the graph.double
compute(Graph<U> graph, U user)
Computes the value of the metric for a single user.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, compute
-
Field Details
-
MAXITER
private final int MAXITERMaximum number of iterations.- See Also:
- Constant Field Values
-
THRESHOLD
private final double THRESHOLDThreshold.- See Also:
- Constant Field Values
-
r
private final double rTeleport parameter. -
u
Original node (if PageRank is personalized).
-
-
Constructor Details
-
ComplementaryPageRank
public ComplementaryPageRank(double r)Constructor (for not personalized PageRank).- Parameters:
r
- the teleport parameter.
-
ComplementaryPageRank
Constructor (for personalized PageRank)- Parameters:
r
- the teleport parameter.u
- the original user.
-
-
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.
-
averageValue
Description copied from interface:VertexMetric
Computes the average value of the metric in the graph.- Specified by:
averageValue
in interfaceVertexMetric<U>
- Parameters:
graph
- The graph.- Returns:
- the average value of the metric.
-