Class PageRank.Algorithm

java.lang.Object
org.jgrapht.alg.scoring.PageRank.Algorithm
Type Parameters:
V - the graph type
E - the edge type
Enclosing class:
PageRank<V,E>

private class PageRank.Algorithm extends 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 Details

    • totalVertices

      private int totalVertices
    • isWeighted

      private boolean isWeighted
    • vertexIndexMap

      private Map<V,Integer> vertexIndexMap
    • vertexMap

      private V[] vertexMap
    • weightSum

      private double[] weightSum
    • curScore

      private double[] curScore
    • nextScore

      private double[] nextScore
    • outDegree

      private int[] outDegree
    • adjList

      private ArrayList<int[]> adjList
    • weightsList

      private ArrayList<double[]> weightsList
  • Constructor Details

    • Algorithm

      public Algorithm()
  • Method Details

    • getScores

      public Map<V,Double> getScores()
    • run

      private void run()
    • runWeighted

      private void runWeighted()
    • teleProp

      private double teleProp()
    • swapScores

      private void swapScores()