11 static constexpr auto NaN = alpaqa::NaN<config_t>;
20 const auto n = x.size(), m = y.size();
21 vec z(n), grad_Lx(n), work(n), g(m), e(m);
35 real_t complementarity = std::inner_product(
36 y.begin(), y.end(), e.begin(),
real_t(0),
37 [](
real_t acc,
real_t ye) {
return std::fmax(acc, std::abs(ye)); }, std::multiplies<>{});
38 return {.stationarity = stationarity,
39 .constr_violation = constr_violation,
40 .complementarity = complementarity};
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.
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,
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.
KKTError< Conf > compute_kkt_error(const alpaqa::TypeErasedProblem< Conf > &problem, alpaqa::crvec< Conf > x, alpaqa::crvec< Conf > y)
typename Conf::real_t real_t
typename Conf::crvec crvec
static constexpr auto NaN