22 const auto n = x.size(), m = y.size();
29 auto stationarity = norm_inf(z);
35 auto constr_violation = norm_inf(e);
37 real_t complementarity = std::inner_product(
38 y.begin(), y.end(), e.begin(),
real_t(0),
43 bounds_violation = norm_inf(project(x, problem.
get_box_C()) - x);
44 return {.stationarity = stationarity,
45 .constr_violation = constr_violation,
46 .complementarity = complementarity,
47 .bounds_violation = bounds_violation};
The main polymorphic minimization problem interface.
real_t eval_prox_grad_step(real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p) const
[Required] Function that computes a proximal gradient step.
bool provides_get_box_C() const
Returns true if the problem provides an implementation of get_box_C.
void eval_grad_L(crvec x, crvec y, rvec grad_L, rvec work_n) const
[Optional] Evaluate the gradient of the Lagrangian
void eval_g(crvec x, rvec gx) const
[Required] Function that evaluates the constraints,
const Box & get_box_C() const
[Optional] Get the rectangular constraint set of the decision variables, .
void eval_proj_diff_g(crvec z, rvec e) const
[Required] Function that evaluates the difference between the given point and its projection onto th...
#define USING_ALPAQA_CONFIG(Conf)
auto norm_inf(const Eigen::MatrixBase< Derived > &v)
Get the maximum or infinity-norm of the given vector.
typename Conf::real_t real_t
typename Conf::crvec crvec
KKTError< Conf > compute_kkt_error(const TypeErasedProblem< Conf > &problem, crvec< Conf > x, crvec< Conf > y)
static constexpr auto NaN