NLA-lib Explorer

NLAlib.SpectralBisection.countedBisectionAlgorithm

Library · def

Uniform model Work: closed

Dense spectral bisection at order n, depth L and cap c runs within operationCount instructions other than matrix operations, plus (L + 1) (2 c + 11) T(n) matrix work, with the output, storage and hypotheses of matrixWorkBisectionAlgorithm.

NLAlib.SpectralBisection.countedBisectionAlgorithm {K : Type} [Inhabited K] (M : Ops.Machine K)
  (dec : K → ℝ) (mm : MatMulMap (K × K)) (qr : QRMap (K × K)) (domain : (Fin 3 → ℕ) → Prop)
  (admitted : ∃ d, domain d) (matrixWork matrixWorkspace : Ops.MatrixOp → List ℕ → ℕ) (T : ℕ → ℕ)
  (hLit : ∀ (d : Fin 3 → ℕ), domain d → Ops.IsExactNatLit dec M (max (d 0) 4))
  (hN : ∀ (d : Fin 3 → ℕ), domain d → 2 ≤ d 0) (hT : Monotone T)
  (hadd : ∀ (i j : ℕ), T i + T j ≤ T (i + j))
  (hMatrix : ∀ (o : Ops.MatrixOp) (ds : List ℕ), matrixWork o ds ≤ T (List.foldr max 0 ds)) :
  Ops.Algorithm
    (Ops.Dense.functionalModel (SpectralBisection.problem domain admitted) M dec
      (Ops.EntryCodec.pair K) (fun {l m n} ↦ mm) (fun {m n} ↦ qr)
      (Ops.Dense.resources matrixWork matrixWorkspace))
    (SpectralBisection.countedSpecification M dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) domain
      admitted matrixWorkspace T)

Full source on GitHub

Import NLAlib.Eigensolvers.SpectralBisection.OperationCount.