![]() |
SOPT
Sparse OPTimisation
|
#include <imaging_forward_backward.h>
Classes | |
| struct | Diagnostic |
| Values indicating how the algorithm ran. More... | |
| struct | DiagnosticAndResult |
| Holds result vector as well. More... | |
Public Types | |
| using | value_type = typename FB::value_type |
| using | Scalar = typename FB::Scalar |
| using | Real = typename FB::Real |
| using | t_Vector = typename FB::t_Vector |
| using | t_LinearTransform = typename FB::t_LinearTransform |
| using | t_Proximal = typename FB::t_Proximal |
| using | t_Gradient = typename FB::t_Gradient |
| using | t_l2Gradient = typename std::function< void(t_Vector &, const t_Vector &)> |
| using | t_IsConverged = typename FB::t_IsConverged |
| using | t_randomUpdater = typename FB::t_randomUpdater |
Public Member Functions | |
| ImagingForwardBackward (t_Vector const &target) | |
| ImagingForwardBackward (t_randomUpdater &updater) | |
| virtual | ~ImagingForwardBackward () |
| SOPT_MACRO (tight_frame, bool) | |
| Whether Ψ is a tight-frame or not. More... | |
| SOPT_MACRO (residual_tolerance, Real) | |
| Convergence of the relative variation of the objective functions. More... | |
| SOPT_MACRO (relative_variation, Real) | |
| Convergence of the relative variation of the objective functions. More... | |
| SOPT_MACRO (residual_convergence, t_IsConverged) | |
| Convergence of the residuals. More... | |
| SOPT_MACRO (objective_convergence, t_IsConverged) | |
| Convergence of the residuals. More... | |
| SOPT_MACRO (itermax, t_uint) | |
| Maximum number of iterations. More... | |
| SOPT_MACRO (regulariser_strength, Real) | |
| γ parameter. More... | |
| SOPT_MACRO (step_size, Real) | |
| γ parameter. More... | |
| SOPT_MACRO (sigma, Real) | |
| γ parameter. More... | |
| SOPT_MACRO (fista, bool) | |
| flag to for FISTA Forward-Backward algorithm. True by default but should be false when using a learned g_function. More... | |
| SOPT_MACRO (is_converged, t_IsConverged) | |
| A function verifying convergence. More... | |
| t_LinearTransform const & | Phi () const |
| Measurement operator. More... | |
| ImagingForwardBackward< SCALAR > & | Phi (t_LinearTransform const &(Phi)) |
| std::shared_ptr< NonDifferentiableFunc< SCALAR > > | g_function () |
| ImagingForwardBackward< SCALAR > & | g_function (std::shared_ptr< NonDifferentiableFunc< SCALAR >> g_function) |
| std::shared_ptr< DifferentiableFunc< SCALAR > > | f_function () |
| ImagingForwardBackward< SCALAR > & | f_function (std::shared_ptr< DifferentiableFunc< SCALAR >> f_function) |
| t_randomUpdater & | random_updater () |
| ImagingForwardBackward< SCALAR > & | random_updater (t_randomUpdater &new_updater) |
| t_LinearTransform const & | Psi () const |
| t_Vector const & | target () const |
| Vector of target measurements. More... | |
| Real | objmin () const |
| Minimum of objective_function. More... | |
| ImagingForwardBackward< Scalar > & | target (t_Vector const &target) |
| Sets the vector of target measurements. More... | |
| Diagnostic | operator() (t_Vector &out) const |
| Calls Forward Backward. More... | |
| Diagnostic | operator() (t_Vector &out, std::tuple< t_Vector, t_Vector > const &guess) |
| Calls Forward Backward. More... | |
| Diagnostic | operator() (t_Vector &out, std::tuple< t_Vector const &, t_Vector const & > const &guess) |
| Calls Forward Backward. More... | |
| DiagnosticAndResult | operator() (std::tuple< t_Vector, t_Vector > const &guess) |
| Calls Forward Backward. More... | |
| DiagnosticAndResult | operator() (std::tuple< t_Vector const &, t_Vector const & > const &guess) |
| Calls Forward Backward. More... | |
| DiagnosticAndResult | operator() () |
| Calls Forward Backward. More... | |
| DiagnosticAndResult | operator() (DiagnosticAndResult const &warmstart) |
| Makes it simple to chain different calls to FB. More... | |
| ImagingForwardBackward &::type | Phi (ARGS &&... args) |
| ImagingForwardBackward< Scalar > & | residual_convergence (Real const &tolerance) |
| Helper function to set-up default residual convergence function. More... | |
| ImagingForwardBackward< Scalar > & | objective_convergence (Real const &tolerance) |
| Helper function to set-up default residual convergence function. More... | |
| ImagingForwardBackward< Scalar > & | is_converged (std::function< bool(t_Vector const &x)> const &func) |
| Convergence function that takes only the output as argument. More... | |
Definition at line 31 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::Real = typename FB::Real |
Definition at line 38 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::Scalar = typename FB::Scalar |
Definition at line 37 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::t_Gradient = typename FB::t_Gradient |
Definition at line 42 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::t_IsConverged = typename FB::t_IsConverged |
Definition at line 44 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::t_l2Gradient = typename std::function<void(t_Vector &, const t_Vector &)> |
Definition at line 43 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::t_LinearTransform = typename FB::t_LinearTransform |
Definition at line 40 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::t_Proximal = typename FB::t_Proximal |
Definition at line 41 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::t_randomUpdater = typename FB::t_randomUpdater |
Definition at line 45 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::t_Vector = typename FB::t_Vector |
Definition at line 39 of file imaging_forward_backward.h.
| using sopt::algorithm::ImagingForwardBackward< SCALAR >::value_type = typename FB::value_type |
Definition at line 36 of file imaging_forward_backward.h.
|
inline |
Sets up imaging wrapper for ForwardBackward. Sets g_function_ to null to avoid having a dependency on the implementation of g_function. The correct implementation should be injected by the code that instantiates this class.
| [in] | target | Vector of target measurements |
Definition at line 69 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::target().
|
inline |
Definition at line 89 of file imaging_forward_backward.h.
|
inlinevirtual |
Definition at line 116 of file imaging_forward_backward.h.
|
inline |
Definition at line 185 of file imaging_forward_backward.h.
Referenced by sopt::algorithm::ImagingForwardBackward< SCALAR >::f_function().
|
inline |
Definition at line 186 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::f_function().
|
inline |
Definition at line 176 of file imaging_forward_backward.h.
Referenced by sopt::algorithm::ImagingForwardBackward< SCALAR >::g_function().
|
inline |
Definition at line 177 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::g_function().
|
inline |
Convergence function that takes only the output as argument.
Definition at line 287 of file imaging_forward_backward.h.
Referenced by TEST_CASE().
|
inline |
Helper function to set-up default residual convergence function.
Definition at line 283 of file imaging_forward_backward.h.
|
inline |
Minimum of objective_function.
Definition at line 216 of file imaging_forward_backward.h.
|
inline |
Calls Forward Backward.
| [in] | guess | initial guess |
Definition at line 257 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::Phi(), sopt::algorithm::ImagingForwardBackward< SCALAR >::target(), and sopt::algorithm::ImagingForwardBackward< SCALAR >::DiagnosticAndResult::x.
Referenced by sopt::algorithm::ImagingForwardBackward< SCALAR >::operator()().
|
inline |
Makes it simple to chain different calls to FB.
Definition at line 264 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::DiagnosticAndResult::x.
|
inline |
Calls Forward Backward.
| [in] | guess | initial guess |
Definition at line 249 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::DiagnosticAndResult::x.
|
inline |
Calls Forward Backward.
| [in] | guess | initial guess |
Definition at line 244 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::operator()().
|
inline |
Calls Forward Backward.
| [out] | out | Output vector x |
Definition at line 225 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::operator()(), sopt::algorithm::ImagingForwardBackward< SCALAR >::Phi(), and sopt::algorithm::ImagingForwardBackward< SCALAR >::target().
|
inline |
Calls Forward Backward.
| [out] | out | Output vector x |
| [in] | guess | initial guess |
Definition at line 238 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::operator()().
|
inline |
Calls Forward Backward.
| [out] | out | Output vector x |
| [in] | guess | initial guess |
Definition at line 232 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::operator()().
|
inline |
Measurement operator.
Definition at line 159 of file imaging_forward_backward.h.
Referenced by main(), sopt::algorithm::ImagingForwardBackward< SCALAR >::operator()(), and sopt::algorithm::ImagingForwardBackward< SCALAR >::Phi().
|
inline |
Definition at line 272 of file imaging_forward_backward.h.
References sopt::linear_transform().
|
inline |
Definition at line 160 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::Phi().
|
inline |
Definition at line 198 of file imaging_forward_backward.h.
|
inline |
Definition at line 192 of file imaging_forward_backward.h.
|
inline |
Definition at line 193 of file imaging_forward_backward.h.
|
inline |
Helper function to set-up default residual convergence function.
Definition at line 279 of file imaging_forward_backward.h.
Referenced by TEST_CASE().
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | fista | , |
| bool | |||
| ) |
flag to for FISTA Forward-Backward algorithm. True by default but should be false when using a learned g_function.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | is_converged | , |
| t_IsConverged | |||
| ) |
A function verifying convergence.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | itermax | , |
| t_uint | |||
| ) |
Maximum number of iterations.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | objective_convergence | , |
| t_IsConverged | |||
| ) |
Convergence of the residuals.
If negative, this convergence criteria is disabled.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | regulariser_strength | , |
| Real | |||
| ) |
γ parameter.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | relative_variation | , |
| Real | |||
| ) |
Convergence of the relative variation of the objective functions.
If negative, this convergence criteria is disabled.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | residual_convergence | , |
| t_IsConverged | |||
| ) |
Convergence of the residuals.
If negative, this convergence criteria is disabled.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | residual_tolerance | , |
| Real | |||
| ) |
Convergence of the relative variation of the objective functions.
If negative, this convergence criteria is disabled.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | sigma | , |
| Real | |||
| ) |
γ parameter.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | step_size | , |
| Real | |||
| ) |
γ parameter.
| sopt::algorithm::ImagingForwardBackward< SCALAR >::SOPT_MACRO | ( | tight_frame | , |
| bool | |||
| ) |
Whether Ψ is a tight-frame or not.
|
inline |
Vector of target measurements.
Definition at line 213 of file imaging_forward_backward.h.
Referenced by sopt::algorithm::ImagingForwardBackward< SCALAR >::ImagingForwardBackward(), sopt::algorithm::ImagingForwardBackward< SCALAR >::operator()(), sopt::algorithm::ImagingForwardBackward< SCALAR >::target(), and TEST_CASE().
|
inline |
Sets the vector of target measurements.
Definition at line 218 of file imaging_forward_backward.h.
References sopt::algorithm::ImagingForwardBackward< SCALAR >::target().