From f60be664aa98f06e5a279704d27c13f43c5ebdd9 Mon Sep 17 00:00:00 2001 From: Sarah Jaffa Date: Tue, 4 Jul 2023 17:45:23 +0100 Subject: [PATCH] Rename to avoid overwriting in loop --- cpp/sopt/l1_proximal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/sopt/l1_proximal.h b/cpp/sopt/l1_proximal.h index c64da0ff..8448a01b 100644 --- a/cpp/sopt/l1_proximal.h +++ b/cpp/sopt/l1_proximal.h @@ -341,8 +341,8 @@ typename L1::Diagnostic L1::operator()(Eigen::MatrixBase &ou Breaker breaker(objective(out, x, gamma), tolerance(), false); // not fista_mixing()); SOPT_LOW_LOG(" - [ProxL1] iter {}, prox_fval = {}", niters, breaker.current()); - Vector const res = Psi().adjoint() * out; - Vector u_l1 = 1e0 / nu() * (res - apply_soft_threshhold(gamma, res)); + Vector const initial_res = Psi().adjoint() * out; + Vector u_l1 = 1e0 / nu() * (initial_res - apply_soft_threshhold(gamma, initial_res)); apply_constraints(out, x - Psi() * u_l1); // Move on to other iterations