Skip to content

Commit

Permalink
Fix norm computation eps_pri
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Mar 28, 2024
1 parent fdc47a3 commit a51666e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion QPALM/src/iteration.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void update_proximal_point_and_penalty(QPALMWorkspace *work, solver_common *c, c
* The infinity norm of that vector is then equal to the maximum of both norms. */
vec_ew_prod(work->scaling->Einv, work->Ax, work->temp_2m, m);
vec_ew_prod(work->scaling->Einv, work->z, work->temp_2m + m, m);
eps_k = (*eps_k_abs) + (*eps_k_rel)*vec_norm_inf(work->temp_2m, m);
eps_k = (*eps_k_abs) + (*eps_k_rel)*vec_norm_inf(work->temp_2m, 2 * m);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion QPALM/src/termination.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void calculate_primal_tolerance(QPALMWorkspace *work) {
* of the infinity norms of Einv*Ax and Einv*z.*/
vec_ew_prod(work->scaling->Einv, work->Ax, work->temp_2m, m);
vec_ew_prod(work->scaling->Einv, work->z, work->temp_2m + m, m);
work->eps_pri = work->settings->eps_abs + work->settings->eps_rel*vec_norm_inf(work->temp_2m, m);
work->eps_pri = work->settings->eps_abs + work->settings->eps_rel*vec_norm_inf(work->temp_2m, 2 * m);
} else {
work->eps_pri = work->settings->eps_abs + work->settings->eps_rel*c_max(
vec_norm_inf(work->Ax, m),
Expand Down

0 comments on commit a51666e

Please sign in to comment.