202202 rank_atol::Real = default_pullback_rank_atol(USVᴴ[2]),
203203 degeneracy_atol::Real = default_pullback_rank_atol(USVᴴ[2]),
204204 gauge_atol::Real = default_pullback_gauge_atol(ΔUSVᴴ...),
205- cg_rtol ::Real = eps(real(eltype(ΔA)))^(3 / 4)
205+ stein_rtol ::Real = eps(real(eltype(ΔA)))^(3 / 4)
206206 )
207207
208208Adds the pullback from the truncated SVD of `A` to `ΔA`, given the output `USVᴴ` and the
@@ -220,14 +220,14 @@ anti-hermitian part of `U' * ΔU + Vᴴ * ΔVᴴ'`, restricted to rows `i` and c
220220which `abs(S[i] - S[j]) < degeneracy_atol`, is not small compared to `gauge_atol`.
221221
222222The contribution from outside the kept singular vectors is solved by conjugate gradients, to
223- an error of about `cg_rtol ` relative to its right-hand side.
223+ an error of about `stein_rtol ` relative to its right-hand side.
224224"""
225225function svd_trunc_pullback! (
226226 ΔA:: AbstractMatrix , A, USVᴴ, ΔUSVᴴ;
227227 rank_atol:: Real = 0 ,
228228 degeneracy_atol:: Real = default_pullback_rank_atol (USVᴴ[2 ]),
229229 gauge_atol:: Real = default_pullback_gauge_atol (ΔUSVᴴ... ),
230- cg_rtol :: Real = eps (real (eltype (ΔA)))^ (3 / 4 ),
230+ stein_rtol :: Real = eps (real (eltype (ΔA)))^ (3 / 4 ),
231231 maxiter:: Int = 10 * minimum (size (ΔA)) # conjugate-gradient iterations
232232 )
233233 # Extract the SVD components
@@ -265,7 +265,7 @@ function svd_trunc_pullback!(
265265 APᴴZ = similar (X, n, p) # for applying AP AP' without forming it
266266 X = hermitian_stein_cg! (
267267 X, (GZ, Z) -> mul! (GZ, AP, mul! (view (APᴴZ, :, axes (Z, 2 )), AP' , Z)), () -> AP * AP' ,
268- S⁻¹ .^ 2 , cg_rtol * norm (X), maxiter;
268+ S⁻¹ .^ 2 , stein_rtol * norm (X), maxiter;
269269 cost_apply = 2 * m * n, cost_apply_formed = m^ 2 , cost_form = m^ 2 * n
270270 )
271271 Yᴴ = lmul! (Diagonal (S⁻¹), X' * AP)
@@ -278,7 +278,7 @@ function svd_trunc_pullback!(
278278 APZ = similar (Y, m, p) # for applying AP' AP without forming it
279279 Y = hermitian_stein_cg! (
280280 Y, (GZ, Z) -> mul! (GZ, AP' , mul! (view (APZ, :, axes (Z, 2 )), AP, Z)), () -> AP' * AP,
281- S⁻¹ .^ 2 , cg_rtol * norm (Y), maxiter;
281+ S⁻¹ .^ 2 , stein_rtol * norm (Y), maxiter;
282282 cost_apply = 2 * m * n, cost_apply_formed = n^ 2 , cost_form = n^ 2 * m
283283 )
284284 X = rmul! (AP * Y, Diagonal (S⁻¹))
0 commit comments