Skip to content

Commit

Permalink
validate nuclear cone
Browse files Browse the repository at this point in the history
  • Loading branch information
dance858 committed Nov 11, 2024
1 parent 688c417 commit 5cc8b31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cones.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ scs_int SCS(validate_cones)(const ScsData *d, const ScsCone *k) {
return -1;
}
for (i = 0; i < k->nucsize; ++i) {
if (k->nuc_m[i] < 1 || k->nuc_n[i] < 1) {
if (k->nuc_m[i] < 1 || k->nuc_n[i] < 1 || k->nuc_n[i] < k->nuc_m[i]) {
scs_printf("nuclear norm cone dimension error\n");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/spectral_cones/nuclear/ell1_cone.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ scs_int ell1_cone_proj_sorted(scs_float t0, const scs_float *x0, scs_float *proj

#ifdef DEBUG
//-------------------------------------------------------------------------
// Check residuals - not needed in production?
// Check residuals - not needed in production
//-------------------------------------------------------------------------
scs_float residuals[3];
compute_cone_residuals_ell1(proj, t0, x0, n, residuals);
Expand Down

0 comments on commit 5cc8b31

Please sign in to comment.