NLA-lib Explorer

NLAlib.shqrAcceptShift_eq_three_phase

Library · theorem

The first accepted shift in three phases, as the program searches: the first accepted Ritz value; else the promising Ritz value r = NLAlib.findRitz if accepted; else the first accepted point of the square grid about r; else r. List.find?_append on ss ++ r :: squareGrid ….

NLAlib.shqrAcceptShift_eq_three_phase {n : ℕ} (τ B θ α γ : ℝ) (m : ℕ)
  (H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ) (ss : List ℂ) :
  shqrAcceptShift τ B θ α γ m H ss =
    (List.find? (fun s ↦ decide (IsShiftAccept τ γ (2 ^ m) H s)) ss).getD
      (if IsShiftAccept τ γ (2 ^ m) H (findRitz H m 1 ss) then findRitz H m 1 ss
      else
        (List.find? (fun s ↦ decide (IsShiftAccept τ γ (2 ^ m) H s))
              (squareGrid (findRitz H m 1 ss)
                (exceptionalRadius (2 ^ m) B θ α (hessenbergPotential (2 ^ m) H))
                (exceptionalSpacing (2 ^ m) B θ α ((1 - γ) ^ 2)))).getD
          (findRitz H m 1 ss))

Full source on GitHub

Import NLAlib.Matrix.QRIteration.ShiftSearch.