Skip to main content
. 2023 Jul 27;25(8):1130. doi: 10.3390/e25081130
Algorithm 4: Power method with the proposed Monte Carlo AMM
Require: A:  m×m symmetric positive-semidefinite matrix, x≠0: m-dimensional randomized unit vector, c∈N
Ensure:  λ: the largest absolute eigenvalue of A
  1:  z←Aα, v←z−α2em
  2:  Set p1,…,pm, such that ∑l=1mpl=1
  3:  for while not converged do
  4:    y←em⊤xv+z⊤xem
  5:    for t=1,…,c do
  6:        Pick it with P[it=l]=pl
  7:        y←y+A′(it)A(it)′⊤xcpit
  8:    end for
  9:    λ←x⊤y
  10:    x←y/∥y∥
  11:  end for
  12:  Return λ