alpaqa no-casadi-dep
Nonconvex constrained optimization
Loading...
Searching...
No Matches
noop.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <variant>
6
7namespace alpaqa {
8
9/// Direction provider that provides no directions (apply always returns false).
10/// @ingroup grp_DirectionProviders
11template <Config Conf>
14
16 using AcceleratorParams = std::monostate;
17 using DirectionParams = std::monostate;
18
23
24 NoopDirection() = default;
27
28 /// @see @ref PANOCDirection::initialize
34
35 /// @see @ref PANOCDirection::has_initial_direction
36 [[nodiscard]] bool has_initial_direction() const { return false; }
37
38 /// @see @ref PANOCDirection::update
39 [[nodiscard]] bool
47
48 /// @see @ref PANOCDirection::apply
49 [[nodiscard]] bool
55
56 /// @see @ref PANOCDirection::changed_γ
59
60 /// @see @ref PANOCDirection::reset
61 void reset() {}
62
63 /// @see @ref PANOCDirection::get_name
64 [[nodiscard]] std::string get_name() const {
65 return "NoopDirection<" + std::string(config_t::get_name()) + '>';
66 }
67 void get_params() const {}
68};
69
70} // namespace alpaqa
#define USING_ALPAQA_CONFIG(Conf)
Definition config.hpp:77
typename Conf::real_t real_t
Definition config.hpp:86
constexpr const auto inf
Definition config.hpp:112
typename Conf::rvec rvec
Definition config.hpp:91
typename Conf::crvec crvec
Definition config.hpp:92
Direction provider that provides no directions (apply always returns false).
Definition noop.hpp:12
std::string get_name() const
Definition noop.hpp:64
void changed_γ(real_t γₖ, real_t old_γₖ)
Definition noop.hpp:57
DirectionParams direction
Definition noop.hpp:21
bool update(real_t γₖ, real_t γₙₑₓₜ, crvec xₖ, crvec xₙₑₓₜ, crvec pₖ, crvec pₙₑₓₜ, crvec grad_ψxₖ, crvec grad_ψxₙₑₓₜ)
Definition noop.hpp:40
NoopDirection(AcceleratorParams, DirectionParams)
Definition noop.hpp:26
void get_params() const
Definition noop.hpp:67
void initialize(const Problem &problem, crvec y, crvec Σ, real_t γ_0, crvec x_0, crvec x̂_0, crvec p_0, crvec grad_ψx_0)
Definition noop.hpp:29
bool apply(real_t γₖ, crvec xₖ, crvec x̂ₖ, crvec pₖ, crvec grad_ψxₖ, rvec qₖ) const
Definition noop.hpp:50
std::monostate DirectionParams
Definition noop.hpp:17
bool has_initial_direction() const
Definition noop.hpp:36
AcceleratorParams accelerator
Definition noop.hpp:20
NoopDirection(Params)
Definition noop.hpp:25
std::monostate AcceleratorParams
Definition noop.hpp:16