Skip to content

Commit

Permalink
actually user zeta
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Rizzi committed Nov 13, 2024
1 parent 87cca70 commit 142c576
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/pressio/solvers_nonlinear/impl/updaters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@ class ArmijoUpdater
}
};

template <typename ScalarType>
template <typename ScalarType>
class BacktrackStrictlyDecreasingObjectiveUpdater
{
private:
ScalarType zeta_ = 1.;
ScalarType zeta_ = 1;

public:
BacktrackStrictlyDecreasingObjectiveUpdater(std::optional<std::vector<ScalarType> > parameter)
{
if (parameter)
{
zeta_ = parameter.value().front();
zeta_ = parameter.value().front();
}
}

Expand Down Expand Up @@ -141,7 +141,7 @@ class BacktrackStrictlyDecreasingObjectiveUpdater

// update : trialState = state + alpha*p_k
::pressio::ops::update(trialState, zero, state, one, p_k, alpha);
if (objective(trialState) <= objectiveValueAtCurrentNewtonStep){
if (objective(trialState) <= zeta_ * objectiveValueAtCurrentNewtonStep){
PRESSIOLOG_DEBUG("backtrack; condition satisfied with alpha= {:6e}", alpha);
::pressio::ops::update(state, one, p_k, alpha);
break;
Expand Down

0 comments on commit 142c576

Please sign in to comment.