Skip to content

Commit 1e645cd

Browse files
add dual feasibility in R2
1 parent b5cbdc9 commit 1e645cd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/R2_alg.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function R2(
239239
:status => stats.status,
240240
:fk => stats.solver_specific[:smooth_obj],
241241
:hk => stats.solver_specific[:nonsmooth_obj],
242-
=> stats.solver_specific[:xi],
242+
=> stats.dual_feas,
243243
:elapsed_time => stats.elapsed_time,
244244
)
245245
return stats.solution, stats.iter, outdict
@@ -416,7 +416,6 @@ function SolverCore.solve!(
416416
< 0 && sqrt_ξ_νInv > neg_tol) &&
417417
error("R2: prox-gradient step should produce a decrease but ξ = $(ξ)")
418418

419-
set_solver_specific!(stats, :xi, sqrt_ξ_νInv)
420419
set_status!(
421420
stats,
422421
get_status(
@@ -501,7 +500,6 @@ function SolverCore.solve!(
501500
< 0 && sqrt_ξ_νInv > neg_tol) &&
502501
error("R2: prox-gradient step should produce a decrease but ξ = $(ξ)")
503502

504-
set_solver_specific!(stats, :xi, sqrt_ξ_νInv)
505503
set_status!(
506504
stats,
507505
get_status(
@@ -540,6 +538,7 @@ function SolverCore.solve!(
540538
end
541539

542540
set_solution!(stats, xk)
541+
set_residuals!(stats, zero(eltype(xk)), sqrt_ξ_νInv)
543542
return stats
544543
end
545544

0 commit comments

Comments
 (0)