Skip to content

Commit c389274

Browse files
fix uninitalized memory in TRDH
1 parent 2bd11ef commit c389274

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/TRDH_alg.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ function TRDHSolver(
5858
set_bounds!(ψ, l_bound_k, u_bound_k)
5959
else
6060
if has_bnds
61-
@. l_bound_k = max(-one(T), l_bound - xk)
62-
@. u_bound_k = min(one(T), u_bound - xk)
61+
@. l_bound_k = max(-one(T), l_bound - x0)
62+
@. u_bound_k = min(one(T), u_bound - x0)
6363
ψ = shifted(reg_nlp.h, xk, l_bound_k, u_bound_k, reg_nlp.selected)
6464
else
6565
ψ = shifted(reg_nlp.h, xk, one(T), χ)
@@ -229,7 +229,7 @@ function TRDH(
229229
β = options.β,
230230
kwargs...
231231
)
232-
return stats
232+
return stats.solution, stats.iter, stats
233233
end
234234

235235
function TRDH(reg_nlp::AbstractRegularizedNLPModel{T, V}; kwargs...) where {T, V}

0 commit comments

Comments
 (0)