Skip to content

Commit

Permalink
changed tolerance in test
Browse files Browse the repository at this point in the history
  • Loading branch information
dance858 committed Nov 17, 2024
1 parent 829853c commit d6cebe1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/cones.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ scs_float SCS(proj_pd_exp_cone)(scs_float *v0, scs_int primal);
// Forward declare spectral matrix cone projections
scs_int SCS(proj_logdet_cone)(scs_float *tvX, const scs_int n, ScsConeWork *c,
scs_int offset, bool *warmstart);
scs_int SCS(proj_nuclear_cone)(scs_float *tX, size_t m, size_t n, ScsConeWork *c);
scs_int SCS(proj_nuclear_cone)(scs_float *tX, scs_int m, scs_int n, ScsConeWork *c);
void SCS(proj_ell_one)(scs_float *tx, size_t n, ScsConeWork *c);
scs_int SCS(proj_sum_largest_evals)(scs_float *tX, scs_int n, scs_int k,
ScsConeWork *c);
Expand Down
4 changes: 2 additions & 2 deletions src/spectral_cones/logdeterminant/log_cone_Newton.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ scs_int log_cone_Newton(scs_float t0, scs_float v0, const scs_float *x0,
{
*v = (v0 > MIN_INIT_LOG_CONE) ? v0 : MIN_INIT_LOG_CONE;

for (size_t i = 0; i < n; ++i)
for (scs_int i = 0; i < n; ++i)
{
x[i] = (x0[i] > MIN_INIT_LOG_CONE) ? x0[i] : MIN_INIT_LOG_CONE;
}
Expand Down Expand Up @@ -175,7 +175,7 @@ scs_int log_cone_Newton(scs_float t0, scs_float v0, const scs_float *x0,
// To avoid pathological cases where some components of
// x approach 0 we use a minimum threshold.
// -------------------------------------------------------------------
for (size_t i = 0; i < n; i++)
for (scs_int i = 0; i < n; i++)
{
x[i] = MAX(x[i], MIN_X);
}
Expand Down
2 changes: 1 addition & 1 deletion src/spectral_cones/logdeterminant/log_cone_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static void check_opt_cond_log_cone(const scs_float *tvx, scs_float t0,
dual_res += dualv * dualv;
}

for (size_t i = 0; i < n; i++)
for (scs_int i = 0; i < n; i++)
{
if (dualx[i] < 0)
{
Expand Down
4 changes: 2 additions & 2 deletions test/spectral_cones_problems/several_logdet_cones.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ static const char *several_logdet_cones(void)
k->sl_size = sl_size;

scs_set_default_settings(stgs);
stgs->eps_abs = 1e-6;
stgs->eps_rel = 1e-6;
stgs->eps_abs = 1e-7;
stgs->eps_rel = 1e-7;
stgs->eps_infeas = 1e-9;


Expand Down

0 comments on commit d6cebe1

Please sign in to comment.