proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
equality-constraint.hpp
Go to the documentation of this file.
1
3#pragma once
4
6
7namespace proxsuite {
8namespace nlp {
9
17template <typename _Scalar>
19public:
20 using Scalar = _Scalar;
22
28
30 using ActiveType = typename Base::ActiveType;
31
32 bool disableGaussNewton() const { return true; }
33
34 inline void projection(const ConstVectorRef &, VectorRef zout) const {
35 zout.setZero();
36 }
37
38 inline void normalConeProjection(const ConstVectorRef &z,
39 VectorRef zout) const {
40 zout = z;
41 }
42
43 inline void applyProjectionJacobian(const ConstVectorRef &,
44 MatrixRef Jout) const {
45 Jout.setZero();
46 }
47
48 inline void applyNormalConeProjectionJacobian(const ConstVectorRef &,
49 MatrixRef) const {
50 return; // do nothing
51 }
52
53 inline void computeActiveSet(const ConstVectorRef &,
54 Eigen::Ref<ActiveType> out) const {
55 out.array() = true;
56 }
57};
58
59template <typename Scalar>
60using EqualityConstraint PROXSUITE_NLP_DEPRECATED_MESSAGE(
61 "Use EqualityConstraintTpl<T> instead") = EqualityConstraintTpl<Scalar>;
62
63#ifdef PROXSUITE_NLP_ENABLE_TEMPLATE_INSTANTIATION
64extern template struct PROXSUITE_NLP_EXPLICIT_INSTANTIATION_DECLARATION_DLLAPI
65 EqualityConstraintTpl<context::Scalar>;
66#endif
67
68} // namespace nlp
69} // namespace proxsuite
70
#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
Definition math.hpp:26
Main package namespace.
Definition bcl-params.hpp:5
Base constraint set type.
Definition fwd.hpp:104
Eigen::Matrix< bool, Eigen::Dynamic, 1 > ActiveType
void projection(const ConstVectorRef &, VectorRef zout) const
Compute projection of variable z onto the constraint set.
EqualityConstraintTpl & operator=(const EqualityConstraintTpl &)=default
void applyNormalConeProjectionJacobian(const ConstVectorRef &, MatrixRef) const
Apply the jacobian of the projection on the normal cone.
void applyProjectionJacobian(const ConstVectorRef &, MatrixRef Jout) const
Apply a jacobian of the projection/proximal operator to a matrix.
EqualityConstraintTpl(const EqualityConstraintTpl &)=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 .
EqualityConstraintTpl(EqualityConstraintTpl &&)=default
void computeActiveSet(const ConstVectorRef &, Eigen::Ref< ActiveType > out) const
EqualityConstraintTpl & operator=(EqualityConstraintTpl &&)=default