17template <
typename _Scalar>
33 return zproj.template lpNorm<1>();
37 return z.array().sign() *
38 (z.array().abs() -
mu_).max(
static_cast<Scalar>(0.));
41 void projection(
const ConstVectorRef &z, VectorRef zout)
const {
50 Eigen::Ref<ActiveType> out)
const {
51 out = z.array().abs() <=
mu_;
ConstraintSetTpl()=default
Eigen::Matrix< bool, Eigen::Dynamic, 1 > ActiveType
decltype(auto) projection_impl(const ConstVectorRef &z) const
NonsmoothPenaltyL1Tpl & operator=(NonsmoothPenaltyL1Tpl &&)=default
void computeActiveSet(const ConstVectorRef &z, Eigen::Ref< ActiveType > out) const
NonsmoothPenaltyL1Tpl & operator=(const NonsmoothPenaltyL1Tpl &)=default
NonsmoothPenaltyL1Tpl()=default
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
NonsmoothPenaltyL1Tpl(const NonsmoothPenaltyL1Tpl &)=default
ConstraintSetTpl< Scalar > Base
Scalar evaluate(const ConstVectorRef &zproj) const
NonsmoothPenaltyL1Tpl(NonsmoothPenaltyL1Tpl &&)=default
void normalConeProjection(const ConstVectorRef &z, VectorRef zout) const
Compute projection of z onto the normal cone to the set. The default implementation is just .
typename Base::ActiveType ActiveType
void projection(const ConstVectorRef &z, VectorRef zout) const
Compute projection of variable z onto the constraint set.