Functions and operators#

group grp_Functions

(Proximable) functions and operators.

Variables

struct alpaqa::prox_fn prox#

Compute the proximal mapping.

outproxγfunc(in).

Param func:

The proximable function h:IRnIRn to apply the proximal mapping of.

Param in:

[in] Input vector or matrix x, e.g. current iterate.

Param out:

[out] Proximal mapping of (γh) at x. x^proxγh(x)

Param γ:

[in] Proximal step size γ.

struct alpaqa::prox_step_fn prox_step#

Compute a generalized forward-backward step.

outproxγfunc(in+γfwdfwd_step)fb_stepoutin.

Param func:

The proximable function h:IRnIRn to apply the proximal mapping of.

Param in:

[in] Input vector or matrix x, e.g. current iterate.

Param fwd_step:

[in] Step d to add to x before computing the proximal mapping. Scaled by γfwd.

Param out:

[out] Proximal mapping of (γh) at x+γfwdd. x^proxγh(x+γfwdd)

Param fb_step:

[out] Forward-backward step p. p=x^x^

Param γ:

[in] Proximal step size γ.

Param γ_fwd:

[in] Forward step size γfwd.

template<Config Conf, class Weight = typename Conf::real_t>
struct L1Norm
#include <alpaqa/functions/l1-norm.hpp>

ℓ₁-norm.

Template Parameters:

Weight – Type of weighting factors. Either scalar or vector.

Public Types

using weight_t = Weight

Public Functions

inline L1Norm(weight_t λ)
inline L1Norm()
L1Norm() = default
inline real_t prox(crmat in, rmat out, real_t γ = 1)

Public Members

weight_t λ

Public Static Attributes

static constexpr bool scalar_weight = std::is_same_v<weight_t, real_t>

Friends

inline friend real_t alpaqa_tag_invoke(tag_t<alpaqa::prox>, L1Norm &self, crmat in, rmat out, real_t γ)
template<Config Conf, class SVD = DefaultSVD<Conf>>
struct NuclearNorm
#include <alpaqa/functions/nuclear-norm.hpp>

Nuclear norm (ℓ₁-norm of singular values).

Public Functions

inline NuclearNorm(real_t λ = 1)

Construct without pre-allocation.

inline NuclearNorm(real_t λ, length_t rows, length_t cols)

Construct with pre-allocation.

inline real_t prox(crmat in, rmat out, real_t γ = 1)

Public Members

real_t λ
SVD svd
vec singular_values

Friends

inline friend real_t alpaqa_tag_invoke(tag_t<alpaqa::prox>, NuclearNorm &self, crmat in, rmat out, real_t γ)