- java.lang.Object
-
- org.jgrapht.alg.scoring.PageRank.Algorithm
-
- Type Parameters:
V
- the graph typeE
- the edge type
private class PageRank.Algorithm extends java.lang.Object
The actual implementation.We use this pattern with the inner class in order to be able to cache the result but also allow the garbage collector to acquire all auxiliary memory used during the execution of the algorithm.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<int[]>
adjList
private double[]
curScore
private boolean
isWeighted
private double[]
nextScore
private int[]
outDegree
private int
totalVertices
private java.util.Map<V,java.lang.Integer>
vertexIndexMap
private V[]
vertexMap
private java.util.ArrayList<double[]>
weightsList
private double[]
weightSum
-
Constructor Summary
Constructors Constructor Description Algorithm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<V,java.lang.Double>
getScores()
private void
run()
private void
runWeighted()
private void
swapScores()
private double
teleProp()
-
-
-
Field Detail
-
totalVertices
private int totalVertices
-
isWeighted
private boolean isWeighted
-
vertexIndexMap
private java.util.Map<V,java.lang.Integer> vertexIndexMap
-
vertexMap
private V[] vertexMap
-
weightSum
private double[] weightSum
-
curScore
private double[] curScore
-
nextScore
private double[] nextScore
-
outDegree
private int[] outDegree
-
adjList
private java.util.ArrayList<int[]> adjList
-
weightsList
private java.util.ArrayList<double[]> weightsList
-
-
Method Detail
-
getScores
public java.util.Map<V,java.lang.Double> getScores()
-
run
private void run()
-
runWeighted
private void runWeighted()
-
teleProp
private double teleProp()
-
swapScores
private void swapScores()
-
-