#include <alpaqa/inner/directions/pantr/pantr-direction.hpp>
This class outlines the interface for direction providers used by PANTR-like algorithms.
Definition at line 13 of file pantr-direction.hpp.
Public Types | |
using | Problem = TypeErasedProblem< config_t > |
Public Member Functions | |
void | initialize (const Problem &problem, crvec y, crvec Σ, real_t γ_0, crvec x_0, crvec x̂_0, crvec p_0, crvec grad_ψx_0)=delete |
Initialize the direction provider. | |
bool | has_initial_direction () const |
Return whether a direction is available on the very first iteration, before the first call to update. | |
bool | update (real_t γₖ, real_t γₙₑₓₜ, crvec xₖ, crvec xₙₑₓₜ, crvec pₖ, crvec pₙₑₓₜ, crvec grad_ψxₖ, crvec grad_ψxₙₑₓₜ)=delete |
Update the direction provider when accepting the next iterate. | |
real_t | apply (real_t γₖ, crvec xₖ, crvec x̂ₖ, crvec pₖ, crvec grad_ψxₖ, real_t radius, rvec qₖ) const =delete |
Compute the direction in the given point. | |
void | changed_γ (real_t γₖ, real_t old_γₖ)=delete |
Called when the PANTR step size changes. | |
void | reset ()=delete |
Called when using the direction failed. | |
std::string | get_name () const =delete |
Get a human-readable name for this direction provider. | |
using Problem = TypeErasedProblem<config_t> |
Definition at line 15 of file pantr-direction.hpp.
|
delete |
Initialize the direction provider.
[in] | problem | Problem description. |
[in] | y | Lagrange multipliers. |
[in] | Σ | Penalty factors. |
[in] | γ_0 | Initial step size. |
[in] | x_0 | Initial iterate. |
[in] | x̂_0 | Result of proximal gradient step in x_0 . |
[in] | p_0 | Proximal gradient step in x_0 . |
[in] | grad_ψx_0 | Gradient of the objective in x_0 . |
The references problem
, y
and Σ
are guaranteed to remain valid for subsequent calls to update, apply, changed_γ and reset.
|
inline |
Return whether a direction is available on the very first iteration, before the first call to update.
Definition at line 44 of file pantr-direction.hpp.
|
delete |
Update the direction provider when accepting the next iterate.
[in] | γₖ | Current step size. |
[in] | γₙₑₓₜ | Step size for the next iterate. |
[in] | xₖ | Current iterate. |
[in] | xₙₑₓₜ | Next iterate. |
[in] | pₖ | Proximal gradient step in the current iterate. |
[in] | pₙₑₓₜ | Proximal gradient step in the next iterate. |
[in] | grad_ψxₖ | Gradient of the objective in the current iterate. |
[in] | grad_ψxₙₑₓₜ | Gradient of the objective in the next iterate. |
|
delete |
Compute the direction in the given point.
[in] | γₖ | Current step size. |
[in] | xₖ | Current iterate. |
[in] | x̂ₖ | Result of proximal gradient step in xₖ . |
[in] | pₖ | Proximal gradient step in xₖ . |
[in] | grad_ψxₖ | Gradient of the objective at xₖ . |
[in] | radius | Trust radius Δ. |
[out] | qₖ | Resulting step. |
|
delete |
Called when using the direction failed.
A possible behavior could be to flush the buffers, hopefully yielding a better direction on the next iteration.
|
delete |
Get a human-readable name for this direction provider.