Class DominantEigenvectorParallelPowerMethod

java.lang.Object
it.unimi.dsi.law.rank.SpectralRanking
it.unimi.dsi.law.rank.DominantEigenvectorParallelPowerMethod

public class DominantEigenvectorParallelPowerMethod
extends SpectralRanking
Computes the left dominant eigenvalue and eigenvector of a graph using a parallel implementation of the power method. At the end of the computation, lambda will contain an approximation of the dominant eigenvalue.
  • If the Markovian flag has been set, the rows of the adjacency matrix will be ℓ1-normalized.
  • normDelta() returns the difference in norm between the previous approximation of the dominant eigenvector and the product of the previous approximation by the graph, divided by the current estimate of the dominant eigenvalue obtained by Rayleigh quotients.
  • The step() method is not available: due to the need for some synchronization logic, only stepUntil(StoppingCriterion) is available.
  • The computed eigenvector will be a unit vector in the specified norm. In particular, in the Markovian case if you use a norm different from Norm.L_1 the dominant eigenvector will need to be ℓ1-normalized to be a distribution.
  • It is strongly suggested that you apply a shift (e.g., -1). A negative shift guarantees convergence even in the presence of eigenvalues of maximum modulus that are not real positive (see a numerical linear algebra textbook for details).
Author:
Sebastiano Vigna
See Also:
SpectralRanking
  • Field Details

    • DEFAULT_DOMINANT_EIGENVECTOR_NORM

      public static final Norm DEFAULT_DOMINANT_EIGENVECTOR_NORM
      The default norm (Norm.L_2). Works well with Rayleigh-quotient estimation of the dominant eigenvalue.
    • previousRank

      public double[] previousRank
      The rank vector after the last iteration (only meaningful after at least one step).
    • markovian

      public boolean markovian
      if true, the matrix will be stocasticized.
    • shift

      public double shift
      A shift.
    • lambda

      public double lambda
      The dominant eigenvalue.
    • norm

      public Norm norm
      The norm.
  • Constructor Details

    • DominantEigenvectorParallelPowerMethod

      public DominantEigenvectorParallelPowerMethod​(ImmutableGraph transpose, int requestedThreads, Logger logger)
      Creates a new instance.
      Parameters:
      transpose - the transpose of the graph.
      requestedThreads - the requested number of threads (0 for Runtime.availableProcessors()).
      logger - a logger that will be passed to super().
    • DominantEigenvectorParallelPowerMethod

      public DominantEigenvectorParallelPowerMethod​(ImmutableGraph transpose, Logger logger)
      Creates a new instance.
      Parameters:
      transpose - the transpose of the graph.
      logger - a logger that will be passed to super().
    • DominantEigenvectorParallelPowerMethod

      public DominantEigenvectorParallelPowerMethod​(ImmutableGraph transpose)
      Creates a new instance.
      Parameters:
      transpose - the transpose of the graph.
  • Method Details