Skip to content

Commit

Permalink
replace AA with averaging
Browse files Browse the repository at this point in the history
  • Loading branch information
bodono committed Jan 1, 2024
1 parent e0a8356 commit 754018d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/aa.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ aa_float aa_apply(aa_float *f, const aa_float *x, AaWork *a) {
}

a->iter++;

if (a->iter % a->interval == 0) {
/* reset to average */
if (a->verbosity > 0) {
Expand Down
13 changes: 6 additions & 7 deletions src/scs.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,13 +896,12 @@ static ScsWork *init_work(const ScsData *d, const ScsCone *k,
}
if (w->stgs->acceleration_lookback) {
/* TODO(HACK!) negative acceleration_lookback interpreted as type-II */
if (!(w->accel = aa_init(l, ABS(w->stgs->acceleration_lookback),
w->stgs->acceleration_lookback > 0,
w->stgs->acceleration_lookback > 0
? AA_REGULARIZATION_TYPE_1
: AA_REGULARIZATION_TYPE_2,
AA_RELAXATION, AA_SAFEGUARD_FACTOR,
AA_MAX_WEIGHT_NORM, VERBOSITY))) {
if (!(w->accel = aa_init(
l, ABS(w->stgs->acceleration_lookback),
w->stgs->acceleration_lookback > 0,
w->stgs->acceleration_lookback > 0 ? AA_REGULARIZATION_TYPE_1
: AA_REGULARIZATION_TYPE_2,
AA_RELAXATION, AA_SAFEGUARD_FACTOR, AA_MAX_WEIGHT_NORM, 1))) {
if (w->stgs->verbose) {
scs_printf("WARN: aa_init returned NULL, no acceleration applied.\n");
}
Expand Down

0 comments on commit 754018d

Please sign in to comment.