![]() |
SOPT
Sparse OPTimisation
|
Proximal Alternate Direction method of mutltipliers. More...
#include <padmm.h>
Classes | |
struct | Diagnostic |
Values indicating how the algorithm ran. More... | |
struct | DiagnosticAndResult |
Holds result vector as well. More... | |
Public Types | |
using | value_type = SCALAR |
Scalar type. More... | |
using | Scalar = value_type |
Scalar type. More... | |
using | Real = typename real_type< Scalar >::type |
Real type. More... | |
using | t_Vector = Vector< Scalar > |
Type of then underlying vectors. More... | |
using | t_LinearTransform = LinearTransform< t_Vector > |
Type of the Ψ and Ψ^H operations, as well as Φ and Φ^H. More... | |
using | t_IsConverged = std::function< bool(const t_Vector &, const t_Vector &)> |
Type of the convergence function. More... | |
using | t_Proximal = ProximalFunction< Scalar > |
Type of the convergence function. More... | |
Public Member Functions | |
template<typename DERIVED > | |
ProximalADMM (t_Proximal const &f_proximal, t_Proximal const &g_proximal, Eigen::MatrixBase< DERIVED > const &target) | |
virtual | ~ProximalADMM () |
SOPT_MACRO (itermax, t_uint) | |
Maximum number of iterations. More... | |
SOPT_MACRO (regulariser_strength, Real) | |
γ parameter. More... | |
SOPT_MACRO (lagrange_update_scale, Real) | |
Lagrange update scale β More... | |
SOPT_MACRO (is_converged, t_IsConverged) | |
A function verifying convergence. More... | |
SOPT_MACRO (Phi, t_LinearTransform) | |
Measurement operator. More... | |
SOPT_MACRO (f_proximal, t_Proximal) | |
First proximal. More... | |
SOPT_MACRO (g_proximal, t_Proximal) | |
Second proximal. More... | |
void | f_proximal (t_Vector &out, Real regulariser_strength, t_Vector const &x) const |
Simplifies calling the proximal of f. More... | |
void | g_proximal (t_Vector &out, Real regulariser_strength, t_Vector const &x) const |
Simplifies calling the proximal of f. More... | |
ProximalADMM< Scalar > & | is_converged (std::function< bool(t_Vector const &x)> const &func) |
Convergence function that takes only the output as argument. More... | |
t_Vector const & | target () const |
Vector of target measurements. More... | |
template<typename DERIVED > | |
ProximalADMM< Scalar > & | target (Eigen::MatrixBase< DERIVED > const &target) |
Sets the vector of target measurements. More... | |
bool | is_converged (t_Vector const &x, t_Vector const &residual) const |
Facilitates call to user-provided convergence function. More... | |
Diagnostic | operator() (t_Vector &out) const |
Calls Proximal ADMM. More... | |
Diagnostic | operator() (t_Vector &out, std::tuple< t_Vector, t_Vector > const &guess) const |
Calls Proximal ADMM. More... | |
Diagnostic | operator() (t_Vector &out, std::tuple< t_Vector const &, t_Vector const & > const &guess) const |
Calls Proximal ADMM. More... | |
DiagnosticAndResult | operator() (std::tuple< t_Vector, t_Vector > const &guess) const |
Calls Proximal ADMM. More... | |
DiagnosticAndResult | operator() (std::tuple< t_Vector const &, t_Vector const & > const &guess) const |
Calls Proximal ADMM. More... | |
DiagnosticAndResult | operator() () const |
Calls Proximal ADMM. More... | |
DiagnosticAndResult | operator() (DiagnosticAndResult const &warmstart) const |
Makes it simple to chain different calls to PADMM. More... | |
ProximalADMM &::type | Phi (ARGS &&... args) |
std::tuple< t_Vector, t_Vector > | initial_guess () const |
Computes initial guess for x and the residual using the targets. More... | |
Static Public Member Functions | |
static std::tuple< t_Vector, t_Vector > | initial_guess (t_Vector const &target, t_LinearTransform const &phi) |
Computes initial guess for x and the residual using the targets. More... | |
Proximal Alternate Direction method of mutltipliers.
\(\min_{x, z} f(x) + h(z)\) subject to \(Φx + z = y\). \(y\) is a target vector.
using sopt::algorithm::ProximalADMM< SCALAR >::Real = typename real_type<Scalar>::type |
using sopt::algorithm::ProximalADMM< SCALAR >::Scalar = value_type |
using sopt::algorithm::ProximalADMM< SCALAR >::t_IsConverged = std::function<bool (const t_Vector &, const t_Vector &)> |
using sopt::algorithm::ProximalADMM< SCALAR >::t_LinearTransform = LinearTransform<t_Vector> |
using sopt::algorithm::ProximalADMM< SCALAR >::t_Proximal = ProximalFunction<Scalar> |
using sopt::algorithm::ProximalADMM< SCALAR >::t_Vector = Vector<Scalar> |
using sopt::algorithm::ProximalADMM< SCALAR >::value_type = SCALAR |
|
inline |
Setups ProximalADMM
[in] | f_proximal | proximal operator of the \(f\) function. |
[in] | g_proximal | proximal operator of the \(g\) function |
Definition at line 60 of file padmm.h.
|
inlinevirtual |
|
inline |
Simplifies calling the proximal of f.
|
inline |
Simplifies calling the proximal of f.
|
inline |
Computes initial guess for x and the residual using the targets.
with y the vector of measurements
Definition at line 183 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::Phi(), and sopt::algorithm::ProximalADMM< SCALAR >::target().
Referenced by sopt::algorithm::ImagingProximalADMM< SCALAR >::operator()(), and sopt::algorithm::ProximalADMM< SCALAR >::operator()().
|
inlinestatic |
Computes initial guess for x and the residual using the targets.
with y the vector of measurements
This function simplifies creating overloads for operator() in PADMM wrappers.
Definition at line 193 of file padmm.h.
References sopt::LinearTransform< VECTOR >::adjoint(), sopt::LinearTransform< VECTOR >::sq_norm(), and sopt::algorithm::ProximalADMM< SCALAR >::target().
|
inline |
Convergence function that takes only the output as argument.
Definition at line 112 of file padmm.h.
Referenced by sopt::algorithm::ProximalADMM< SCALAR >::is_converged(), main(), and SCENARIO().
|
inline |
Facilitates call to user-provided convergence function.
Definition at line 126 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::is_converged().
|
inline |
Calls Proximal ADMM.
[in] | guess | initial guess |
Definition at line 161 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::initial_guess(), and sopt::algorithm::ProximalADMM< SCALAR >::DiagnosticAndResult::x.
Referenced by sopt::algorithm::ProximalADMM< SCALAR >::operator()().
|
inline |
Makes it simple to chain different calls to PADMM.
Definition at line 167 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::Diagnostic::residual, and sopt::algorithm::ProximalADMM< SCALAR >::DiagnosticAndResult::x.
|
inline |
Calls Proximal ADMM.
[in] | guess | initial guess |
Definition at line 153 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::DiagnosticAndResult::x.
|
inline |
Calls Proximal ADMM.
[in] | guess | initial guess |
Definition at line 148 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::operator()().
|
inline |
Calls Proximal ADMM.
[out] | out | Output vector x |
Definition at line 132 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::initial_guess(), and sopt::algorithm::ProximalADMM< SCALAR >::operator()().
Referenced by sopt::algorithm::ProximalADMM< SCALAR >::operator()().
|
inline |
Calls Proximal ADMM.
[out] | out | Output vector x |
[in] | guess | initial guess |
Definition at line 142 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::operator()().
|
inline |
Calls Proximal ADMM.
[out] | out | Output vector x |
[in] | guess | initial guess |
Definition at line 136 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::operator()().
|
inline |
Definition at line 174 of file padmm.h.
References sopt::linear_transform().
Referenced by sopt::algorithm::ProximalADMM< SCALAR >::initial_guess(), SCENARIO(), and TEST_CASE().
sopt::algorithm::ProximalADMM< SCALAR >::SOPT_MACRO | ( | f_proximal | , |
t_Proximal | |||
) |
First proximal.
sopt::algorithm::ProximalADMM< SCALAR >::SOPT_MACRO | ( | g_proximal | , |
t_Proximal | |||
) |
Second proximal.
sopt::algorithm::ProximalADMM< SCALAR >::SOPT_MACRO | ( | is_converged | , |
t_IsConverged | |||
) |
A function verifying convergence.
It takes as input two arguments: the current solution x and the current residual.
sopt::algorithm::ProximalADMM< SCALAR >::SOPT_MACRO | ( | itermax | , |
t_uint | |||
) |
Maximum number of iterations.
sopt::algorithm::ProximalADMM< SCALAR >::SOPT_MACRO | ( | lagrange_update_scale | , |
Real | |||
) |
Lagrange update scale β
sopt::algorithm::ProximalADMM< SCALAR >::SOPT_MACRO | ( | Phi | , |
t_LinearTransform | |||
) |
Measurement operator.
sopt::algorithm::ProximalADMM< SCALAR >::SOPT_MACRO | ( | regulariser_strength | , |
Real | |||
) |
γ parameter.
|
inline |
Vector of target measurements.
Definition at line 117 of file padmm.h.
Referenced by sopt::algorithm::ProximalADMM< SCALAR >::initial_guess(), and sopt::algorithm::ProximalADMM< SCALAR >::target().
|
inline |
Sets the vector of target measurements.
Definition at line 120 of file padmm.h.
References sopt::algorithm::ProximalADMM< SCALAR >::target().