1 #ifndef SOPT_OBJECTIVE_FUNCTION_H
2 #define SOPT_OBJECTIVE_FUNCTION_H
3 #include "sopt/config.h"
16 const std::function<
t_real(T)> &g,
const t_real &sig,
const T &y,
26 const std::function<
t_real(T)> &g,
const t_real &sig,
const T &y,
36 const std::function<
t_real(T)> &g,
const t_real &sig,
const T &y,
38 return [=](
const T &x) ->
t_real {
39 return g(x) + 0.5 * std::pow(
sopt::l2_norm(y - measurement_operator * x) / sig, 2);
47 if (gamma <= 0)
SOPT_THROW(
"regularsiation paramter is not greater than 0.");
48 const std::function<
t_real(T)> g = [=](
const T &x) ->
t_real {
51 return unconstrained_regularisation<T>(g, sig, y, measurement_operator);
55 const std::function<
t_real(T)> &g,
const t_real &sig,
const T &y,
58 return unconstrained_regularisation<T>(g, sig, mop * y, mop);
66 return unconstrained_l1_regularisation<T>(gamma, sig, mop * y, mop, wavelet_operator);
std::function< t_real(T)> const unconstrained_l1_regularisation(const t_real &gamma, const t_real &sig, const T &y, const sopt::LinearTransform< T > &measurement_operator, const sopt::LinearTransform< T > &wavelet_operator)
std::function< t_real(T)> const unconstrained_regularisation(const std::function< t_real(T)> &g, const t_real &sig, const T &y, const sopt::OperatorFunction< T > &measurement_operator)
returns g(x) + ||y - Φ x||_2^2 as a function
std::function< t_real(T)> const unconstrained_L1_regularisation(const t_real &gamma, const t_real &sig, const T &y, const sopt::OperatorFunction< T > &measurement_operator, const sopt::LinearTransform< T > &wavelet_operator)
returns ||ψ^t x||_1 + ||y - Φ x||_2^2 as a function
double t_real
Root of the type hierarchy for real numbers.
std::function< void(VECTOR &, VECTOR const &)> OperatorFunction
Typical function out = A*x.
real_type< typename T0::Scalar >::type l1_norm(Eigen::ArrayBase< T0 > const &input, Eigen::ArrayBase< T1 > const &weights)
Computes weighted L1 norm.
real_type< typename T0::Scalar >::type l2_norm(Eigen::ArrayBase< T0 > const &input, Eigen::ArrayBase< T1 > const &weights)
Computes weighted L2 norm.