Skip to content

Commit

Permalink
Add BoxConstrProblem::provides_get_box_C
Browse files Browse the repository at this point in the history
tttapa committed Nov 22, 2023
1 parent 808f3e6 commit 95c93a7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/alpaqa/include/alpaqa/problem/box-constr-problem.hpp
Original file line number Diff line number Diff line change
@@ -178,6 +178,13 @@ class BoxConstrProblem {
/// @see @ref TypeErasedProblem::get_box_D
const Box &get_box_D() const { return D; }

/// Only supported if the ℓ₁-regularization term is zero.
/// @see @ref TypeErasedProblem::provides_get_box_C
[[nodiscard]] bool provides_get_box_C() const {
const auto nλ = l1_reg.size();
return nλ == 0 || (nλ == 1 && l1_reg(0) == 0);
}

/// @see @ref TypeErasedProblem::eval_inactive_indices_res_lna
index_t eval_inactive_indices_res_lna(real_t γ, crvec x, crvec grad_ψ, rindexvec J) const {
index_t nJ = 0;

0 comments on commit 95c93a7

Please sign in to comment.