20 using ActiveType = Eigen::Matrix<bool, Eigen::Dynamic, 1>;
37 virtual void projection(
const ConstVectorRef &z, VectorRef zout)
const = 0;
45 VectorRef zout)
const = 0;
55 MatrixRef Jout)
const;
64 MatrixRef Jout)
const;
76 Eigen::Ref<ActiveType> out)
const = 0;
94 const ConstVectorRef &zproj)
const {
96 res +=
static_cast<Scalar>(0.5) *
mu_inv_ * zproj.squaredNorm();
103 VectorRef zprojout)
const {
116#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
117extern template struct ALIGATOR_EXPLICIT_INSTANTIATION_DECLARATION_DLLAPI
123#include "aligator/core/constraint-set.hxx"
Base constraint set type.
virtual ~ConstraintSetTpl()=default
ConstraintSetTpl()=default
virtual void applyNormalConeProjectionJacobian(const ConstVectorRef &z, MatrixRef Jout) const
Apply the jacobian of the projection on the normal cone.
virtual void computeActiveSet(const ConstVectorRef &z, Eigen::Ref< ActiveType > out) const =0
Eigen::Matrix< bool, Eigen::Dynamic, 1 > ActiveType
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
virtual void applyProjectionJacobian(const ConstVectorRef &z, MatrixRef Jout) const
Apply a jacobian of the projection/proximal operator to a matrix.
virtual Scalar evaluate(const ConstVectorRef &) const
virtual void normalConeProjection(const ConstVectorRef &z, VectorRef zout) const =0
Compute projection of z onto the normal cone to the set. The default implementation is just .
Scalar evaluateMoreauEnvelope(const ConstVectorRef &zin, const ConstVectorRef &zproj) const
Evaluate the Moreau envelope with parameter mu for the given contraint set or nonsmooth penalty at p...
void setProxParameter(const Scalar mu) const
Update proximal parameter; this applies to when this class is a proximal operator that isn't a projec...
virtual bool disableGaussNewton() const
virtual void projection(const ConstVectorRef &z, VectorRef zout) const =0
Compute projection of variable z onto the constraint set.
bool operator==(const ConstraintSetTpl< Scalar > &rhs)
Scalar computeMoreauEnvelope(const ConstVectorRef &zin, VectorRef zprojout) const
Evaluate the Moreau envelope with parameter mu for the given contraint set or nonsmooth penalty at p...