@@ -338,6 +338,7 @@ auto ZeroFPRSolver<DirectionProviderT>::operator()(
338
338
τ = τ_init;
339
339
real_t τ_prev = -1 ;
340
340
bool update_lbfgs_in_linesearch = params.update_direction_in_candidate ;
341
+ bool update_lbfgs_in_accel = params.update_direction_in_accel ;
341
342
bool updated_lbfgs = false ;
342
343
bool dir_rejected = true ;
343
344
@@ -389,6 +390,21 @@ auto ZeroFPRSolver<DirectionProviderT>::operator()(
389
390
eval_prox_grad_step (*next);
390
391
eval_cost_in_prox (*next);
391
392
393
+ // Update L-BFGS
394
+ if (update_lbfgs_in_accel && !updated_lbfgs) {
395
+ if (τ > 0 && params.update_direction_from_prox_step ) {
396
+ s.lbfgs_rejected += dir_rejected = not direction.update (
397
+ curr->γ, next->γ, curr->x ̂, next->x , prox->p , next->p ,
398
+ prox->grad_ ψ, next->grad_ ψ);
399
+ } else {
400
+ s.lbfgs_rejected += dir_rejected = not direction.update (
401
+ curr->γ, next->γ, curr->x , next->x , curr->p , next->p ,
402
+ curr->grad_ ψ, next->grad_ ψ);
403
+ }
404
+ update_lbfgs_in_accel = false ;
405
+ updated_lbfgs = true ;
406
+ }
407
+
392
408
// Quadratic upper bound step size condition
393
409
if (next->L < params.L_max && qub_violated (*next)) {
394
410
next->γ /= 2 ;
@@ -404,7 +420,7 @@ auto ZeroFPRSolver<DirectionProviderT>::operator()(
404
420
405
421
// Update L-BFGS
406
422
if (update_lbfgs_in_linesearch && !updated_lbfgs) {
407
- if (params.update_direction_from_prox_step ) {
423
+ if (τ > 0 && params.update_direction_from_prox_step ) {
408
424
s.lbfgs_rejected += dir_rejected = not direction.update (
409
425
curr->γ, next->γ, curr->x ̂, next->x , prox->p , next->p ,
410
426
prox->grad_ ψ, next->grad_ ψ);
0 commit comments