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 {
71 requires is_config_v<typename T::config_t>;
76 typename T::config_t::crmat,
typename T::config_t::rmat,
77 typename T::config_t::rmat,
typename T::config_t::real_t,
78 typename T::config_t::real_t>;
80 requires std::is_same_v<
83 typename T::config_t::crmat,
typename T::config_t::rmat,
84 typename T::config_t::rmat,
typename T::config_t::real_t,
85 typename T::config_t::real_t>,
86 typename T::config_t::real_t>;
89 typename T::config_t::crmat fwd_step,
90 typename T::config_t::rmat out,
91 typename T::config_t::rmat fb_step,
92 typename T::config_t::real_t γ = 1,
93 typename T::config_t::real_t γ_fwd = -1) const
96 typename T::config_t::
crmat, typename T::config_t::
rmat,
97 typename T::config_t::
rmat, typename T::config_t::
real_t,
98 typename T::config_t::
real_t>) ->
99 typename T::config_t::
real_t {
101 std::move(fwd_step), std::move(out),
102 std::move(fb_step), γ, γ_fwd);
108 typename T::config_t;
109 requires is_config_v<typename T::config_t>;
113 typename T::config_t::crmat,
typename T::config_t::rmat,
114 typename T::config_t::rmat,
typename T::config_t::real_t,
115 typename T::config_t::real_t>;
117 requires std::invocable<
prox_fn, T &,
typename T::config_t::crmat,
118 typename T::config_t::rmat,
119 typename T::config_t::real_t>;
122 typename T::config_t::crmat fwd_step,
123 typename T::config_t::rmat out,
124 typename T::config_t::rmat fb_step,
125 typename T::config_t::real_t γ = 1,
126 typename T::config_t::real_t γ_fwd = -1) const
127 noexcept(std::is_nothrow_invocable_v<
129 typename T::config_t::
rmat, typename T::config_t::
real_t>) ->
130 typename T::config_t::
real_t {
131 fb_step = in + γ_fwd * fwd_step;
132 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