aligator  0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
 
Loading...
Searching...
No Matches
aligator::NonsmoothPenaltyL1Tpl< _Scalar > Struct Template Reference

Composite \(\ell_1\)-penalty function \( \|c(x)\|_1 \). More...

#include <aligator/modelling/constraints/l1-penalty.hpp>

Inheritance diagram for aligator::NonsmoothPenaltyL1Tpl< _Scalar >:
[legend]
Collaboration diagram for aligator::NonsmoothPenaltyL1Tpl< _Scalar >:
[legend]

Public Types

using Scalar = _Scalar
 
using Base = ConstraintSetTpl<Scalar>
 
using ActiveType = typename Base::ActiveType
 
- Public Types inherited from aligator::ConstraintSetTpl< _Scalar >
using Scalar = _Scalar
 
using ActiveType = Eigen::Matrix<bool, Eigen::Dynamic, 1>
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 NonsmoothPenaltyL1Tpl ()=default
 
 NonsmoothPenaltyL1Tpl (const NonsmoothPenaltyL1Tpl &)=default
 
NonsmoothPenaltyL1Tploperator= (const NonsmoothPenaltyL1Tpl &)=default
 
 NonsmoothPenaltyL1Tpl (NonsmoothPenaltyL1Tpl &&)=default
 
NonsmoothPenaltyL1Tploperator= (NonsmoothPenaltyL1Tpl &&)=default
 
Scalar evaluate (const ConstVectorRef &zproj) const
 
decltype(auto) projection_impl (const ConstVectorRef &z) const
 
void projection (const ConstVectorRef &z, VectorRef zout) const
 Compute projection of variable z onto the constraint set.
 
void normalConeProjection (const ConstVectorRef &z, VectorRef zout) const
 Compute projection of z onto the normal cone to the set. The default implementation is just \( \mathrm{id} - P\).
 
void computeActiveSet (const ConstVectorRef &z, Eigen::Ref< ActiveType > out) const
 
- Public Member Functions inherited from aligator::ConstraintSetTpl< _Scalar >
 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 ConstraintSetTpl ()=default
 
virtual bool disableGaussNewton () const
 
virtual void applyProjectionJacobian (const ConstVectorRef &z, MatrixRef Jout) const
 Apply a jacobian of the projection/proximal operator to a matrix.
 
virtual void applyNormalConeProjectionJacobian (const ConstVectorRef &z, MatrixRef Jout) const
 Apply the jacobian of the projection on the normal cone.
 
void setProxParameter (const Scalar mu) const
 Update proximal parameter; this applies to when this class is a proximal operator that isn't a projection (e.g. \( \ell_1 \)).
 
virtual ~ConstraintSetTpl ()=default
 
bool operator== (const ConstraintSetTpl< Scalar > &rhs)
 
Scalar evaluateMoreauEnvelope (const ConstVectorRef &zin, const ConstVectorRef &zproj) const
 Evaluate the Moreau envelope with parameter mu for the given contraint set or nonsmooth penalty \(g\) at point zin.
 
Scalar computeMoreauEnvelope (const ConstVectorRef &zin, VectorRef zprojout) const
 Evaluate the Moreau envelope with parameter mu for the given contraint set or nonsmooth penalty \(g\) at point zin. This variant evaluates the prox map.
 
Scalar mu () const
 
Scalar mu_inv () const
 

Public Attributes

Scalar mu_
 

Additional Inherited Members

- Protected Attributes inherited from aligator::ConstraintSetTpl< _Scalar >
Scalar mu_ = 0.
 
Scalar mu_inv_
 

Detailed Description

template<typename _Scalar>
struct aligator::NonsmoothPenaltyL1Tpl< _Scalar >

Composite \(\ell_1\)-penalty function \( \|c(x)\|_1 \).

The composite \(\ell_1\)-penalty penalizes the norm \( \| r(x) \|_1\) of a residual function. This class implements the proximity operator (soft-thresholding) and an appropriate generalized Jacobian.

Definition at line 18 of file l1-penalty.hpp.

Member Typedef Documentation

◆ Scalar

template<typename _Scalar>
using aligator::NonsmoothPenaltyL1Tpl< _Scalar >::Scalar = _Scalar

Definition at line 19 of file l1-penalty.hpp.

◆ Base

template<typename _Scalar>
using aligator::NonsmoothPenaltyL1Tpl< _Scalar >::Base = ConstraintSetTpl<Scalar>

Definition at line 28 of file l1-penalty.hpp.

◆ ActiveType

template<typename _Scalar>
using aligator::NonsmoothPenaltyL1Tpl< _Scalar >::ActiveType = typename Base::ActiveType

Definition at line 29 of file l1-penalty.hpp.

Constructor & Destructor Documentation

◆ NonsmoothPenaltyL1Tpl() [1/3]

template<typename _Scalar>
aligator::NonsmoothPenaltyL1Tpl< _Scalar >::NonsmoothPenaltyL1Tpl ( )
default

◆ NonsmoothPenaltyL1Tpl() [2/3]

template<typename _Scalar>
aligator::NonsmoothPenaltyL1Tpl< _Scalar >::NonsmoothPenaltyL1Tpl ( const NonsmoothPenaltyL1Tpl< _Scalar > & )
default

◆ NonsmoothPenaltyL1Tpl() [3/3]

template<typename _Scalar>
aligator::NonsmoothPenaltyL1Tpl< _Scalar >::NonsmoothPenaltyL1Tpl ( NonsmoothPenaltyL1Tpl< _Scalar > && )
default

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename _Scalar>
aligator::NonsmoothPenaltyL1Tpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ operator=() [1/2]

template<typename _Scalar>
NonsmoothPenaltyL1Tpl & aligator::NonsmoothPenaltyL1Tpl< _Scalar >::operator= ( const NonsmoothPenaltyL1Tpl< _Scalar > & )
default

◆ operator=() [2/2]

template<typename _Scalar>
NonsmoothPenaltyL1Tpl & aligator::NonsmoothPenaltyL1Tpl< _Scalar >::operator= ( NonsmoothPenaltyL1Tpl< _Scalar > && )
default

◆ evaluate()

template<typename _Scalar>
Scalar aligator::NonsmoothPenaltyL1Tpl< _Scalar >::evaluate ( const ConstVectorRef & ) const
inlinevirtual

Provided the image zproj by the proximal/projection map, evaluate the nonsmooth penalty or constraint set indicator function.

Note
This will be 0 for projection operators.

Reimplemented from aligator::ConstraintSetTpl< _Scalar >.

Definition at line 32 of file l1-penalty.hpp.

◆ projection_impl()

template<typename _Scalar>
decltype(auto) aligator::NonsmoothPenaltyL1Tpl< _Scalar >::projection_impl ( const ConstVectorRef & z) const
inline

Definition at line 36 of file l1-penalty.hpp.

◆ projection()

template<typename _Scalar>
void aligator::NonsmoothPenaltyL1Tpl< _Scalar >::projection ( const ConstVectorRef & z,
VectorRef zout ) const
inlinevirtual

Compute projection of variable z onto the constraint set.

Parameters
[in]zInput vector
[out]zoutOutput projection

Implements aligator::ConstraintSetTpl< _Scalar >.

Definition at line 41 of file l1-penalty.hpp.

◆ normalConeProjection()

template<typename _Scalar>
void aligator::NonsmoothPenaltyL1Tpl< _Scalar >::normalConeProjection ( const ConstVectorRef & z,
VectorRef zout ) const
inlinevirtual

Compute projection of z onto the normal cone to the set. The default implementation is just \( \mathrm{id} - P\).

Parameters
[in]zInput vector
[out]zoutOutput projection on the normal projection

Implements aligator::ConstraintSetTpl< _Scalar >.

Definition at line 45 of file l1-penalty.hpp.

◆ computeActiveSet()

template<typename _Scalar>
void aligator::NonsmoothPenaltyL1Tpl< _Scalar >::computeActiveSet ( const ConstVectorRef & z,
Eigen::Ref< ActiveType > out ) const
inlinevirtual

Compute the active set of the constraint. Active means the Jacobian of the proximal operator is nonzero.

Implements aligator::ConstraintSetTpl< _Scalar >.

Definition at line 49 of file l1-penalty.hpp.

Member Data Documentation

◆ mu_

template<typename _Scalar>
Scalar aligator::ConstraintSetTpl< Scalar >::mu_
mutable

Definition at line 112 of file constraint-set.hpp.


The documentation for this struct was generated from the following file: