16 requires is_config_v<typename T::config_t>;
20 prox_fn, T &,
typename T::config_t::crmat,
21 typename T::config_t::rmat,
typename T::config_t::real_t>;
23 requires std::is_same_v<
25 typename T::config_t::rmat,
26 typename T::config_t::real_t>,
27 typename T::config_t::real_t>;
30 typename T::config_t::rmat out,
31 typename T::config_t::real_t γ = 1) const
34 typename T::config_t::
rmat, typename T::config_t::
real_t>) ->
35 typename T::config_t::
real_t {
69 requires is_config_v<typename T::config_t>;
74 typename T::config_t::crmat,
typename T::config_t::rmat,
75 typename T::config_t::rmat,
typename T::config_t::real_t,
76 typename T::config_t::real_t>;
78 requires std::is_same_v<
81 typename T::config_t::crmat,
typename T::config_t::rmat,
82 typename T::config_t::rmat,
typename T::config_t::real_t,
83 typename T::config_t::real_t>,
84 typename T::config_t::real_t>;
87 typename T::config_t::crmat fwd_step,
88 typename T::config_t::rmat out,
89 typename T::config_t::rmat fb_step,
90 typename T::config_t::real_t γ = 1,
91 typename T::config_t::real_t γ_fwd = -1) const
94 typename T::config_t::
crmat, typename T::config_t::
rmat,
95 typename T::config_t::
rmat, typename T::config_t::
real_t,
96 typename T::config_t::
real_t>) ->
97 typename T::config_t::
real_t {
99 std::move(fwd_step), std::move(out),
100 std::move(fb_step), γ, γ_fwd);
106 typename T::config_t;
107 requires is_config_v<typename T::config_t>;
111 typename T::config_t::crmat,
typename T::config_t::rmat,
112 typename T::config_t::rmat,
typename T::config_t::real_t,
113 typename T::config_t::real_t>;
115 requires std::invocable<
prox_fn, T &,
typename T::config_t::crmat,
116 typename T::config_t::rmat,
117 typename T::config_t::real_t>;
120 typename T::config_t::crmat fwd_step,
121 typename T::config_t::rmat out,
122 typename T::config_t::rmat fb_step,
123 typename T::config_t::real_t γ = 1,
124 typename T::config_t::real_t γ_fwd = -1) const
125 noexcept(std::is_nothrow_invocable_v<
127 typename T::config_t::
rmat, typename T::config_t::
real_t>) ->
128 typename T::config_t::
real_t {
129 fb_step = in + γ_fwd * fwd_step;
130 auto &&h_out =
prox(func, fb_step, out, γ);
struct alpaqa::prox_fn prox
Compute the proximal mapping.
struct alpaqa::prox_step_fn prox_step
Compute a generalized forward-backward step.
constexpr tag_invoke_fn_ns::tag_invoke_fn alpaqa_tag_invoke
typename Conf::crmat crmat
std::invoke_result_t< decltype(::alpaqa::alpaqa_tag_invoke), Tag, Args... > tag_invoke_result_t
typename Conf::real_t real_t
constexpr bool is_nothrow_tag_invocable_v
Proximal mapping customization point.
auto operator()(T &func, typename T::config_t::crmat in, typename T::config_t::rmat out, typename T::config_t::real_t γ=1) const noexcept(alpaqa::is_nothrow_tag_invocable_v< prox_fn, T &, typename T::config_t::crmat, typename T::config_t::rmat, typename T::config_t::real_t >) -> typename T::config_t::real_t
Proximal mapping customization point for forward-backward steps.
auto operator()(T &func, typename T::config_t::crmat in, typename T::config_t::crmat fwd_step, typename T::config_t::rmat out, typename T::config_t::rmat fb_step, typename T::config_t::real_t γ=1, typename T::config_t::real_t γ_fwd=-1) const noexcept(std::is_nothrow_invocable_v< prox_fn, T &, typename T::config_t::crmat, typename T::config_t::rmat, typename T::config_t::real_t >) -> typename T::config_t::real_t
Default implementation for prox_step if only prox is provided.
auto operator()(T &func, typename T::config_t::crmat in, typename T::config_t::crmat fwd_step, typename T::config_t::rmat out, typename T::config_t::rmat fb_step, typename T::config_t::real_t γ=1, typename T::config_t::real_t γ_fwd=-1) const noexcept(alpaqa::is_nothrow_tag_invocable_v< prox_step_fn, T &, typename T::config_t::crmat, typename T::config_t::crmat, typename T::config_t::rmat, typename T::config_t::rmat, typename T::config_t::real_t, typename T::config_t::real_t >) -> typename T::config_t::real_t