alpaqa 1.0.0a13
Nonconvex constrained optimization
Loading...
Searching...
No Matches
panoc-direction-update.hpp
Go to the documentation of this file.
1#pragma once
2
5
6namespace alpaqa {
7
8/// This class outlines the interface for direction providers used by PANOC-like
9/// algorithms.
10///
11/// @ingroup grp_DirectionProviders
12template <Config Conf>
16
17 /// Initialize the direction provider.
18 ///
19 /// @param[in] problem
20 /// Problem description.
21 /// @param[in] y
22 /// Lagrange multipliers.
23 /// @param[in] Σ
24 /// Penalty factors.
25 /// @param[in] γ_0
26 /// Initial step size.
27 /// @param[in] x_0
28 /// Initial iterate.
29 /// @param[in] x̂_0
30 /// Result of proximal gradient step in @p x_0.
31 /// @param[in] p_0
32 /// Proximal gradient step in @p x_0.
33 /// @param[in] grad_ψx_0
34 /// Gradient of the objective in @p x_0.
35 ///
36 /// The references @p problem, @p y and @p Σ are guaranteed to remain valid
37 /// for subsequent calls to @ref update, @ref apply, @ref changed_γ and
38 /// @ref reset.
39 void initialize(const Problem &problem, crvec y, crvec Σ, real_t γ_0,
41
42 /// Return whether a direction is available on the very first iteration,
43 /// before the first call to @ref update.
44 bool has_initial_direction() const = delete;
45
46 /// Update the direction provider when accepting the next iterate.
47 ///
48 /// @param[in] γₖ
49 /// Current step size.
50 /// @param[in] γₙₑₓₜ
51 /// Step size for the next iterate.
52 /// @param[in] xₖ
53 /// Current iterate.
54 /// @param[in] xₙₑₓₜ
55 /// Next iterate.
56 /// @param[in] pₖ
57 /// Proximal gradient step in the current iterate.
58 /// @param[in] pₙₑₓₜ
59 /// Proximal gradient step in the next iterate.
60 /// @param[in] grad_ψxₖ
61 /// Gradient of the objective in the current iterate.
62 /// @param[in] grad_ψxₙₑₓₜ
63 /// Gradient of the objective in the next iterate.
66
67 /// Apply the direction estimation in the current point.
68 ///
69 /// @param[in] γₖ
70 /// Current step size.
71 /// @param[in] xₖ
72 /// Current iterate.
73 /// @param[in] x̂ₖ
74 /// Result of proximal gradient step in @p xₖ.
75 /// @param[in] pₖ
76 /// Proximal gradient step in @p xₖ.
77 /// @param[in] grad_ψxₖ
78 /// Gradient of the objective at @p xₖ.
79 /// @param[out] qₖ
80 /// Resulting step.
82 rvec qₖ) const = delete;
83
84 /// Called when the PANOC step size changes.
86
87 /// Called when using the direction failed. A possible behavior could be to
88 /// flush the buffers, hopefully yielding a better direction on the next
89 /// iteration.
90 void reset() = delete;
91
92 /// Get a human-readable name for this direction provider.
93 std::string get_name() const = delete;
94};
95
96} // namespace alpaqa
#define USING_ALPAQA_CONFIG(Conf)
Definition config.hpp:56
typename Conf::real_t real_t
Definition config.hpp:65
constexpr const auto inf
Definition config.hpp:85
typename Conf::rvec rvec
Definition config.hpp:69
typename Conf::crvec crvec
Definition config.hpp:70
This class outlines the interface for direction providers used by PANOC-like algorithms.
void changed_γ(real_t γₖ, real_t old_γₖ)=delete
Called when the PANOC step size changes.
std::string get_name() const =delete
Get a human-readable name for this direction provider.
void reset()=delete
Called when using the direction failed.
bool apply(real_t γₖ, crvec xₖ, crvec x̂ₖ, crvec pₖ, crvec grad_ψxₖ, rvec qₖ) const =delete
Apply the direction estimation in the current point.
bool has_initial_direction() const =delete
Return whether a direction is available on the very first iteration, before the first call to update.
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 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.