proxsuite-nlp  0.11.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
 
Loading...
Searching...
No Matches
constraint-set.hxx
Go to the documentation of this file.
1
3#pragma once
4
6
7namespace proxsuite {
8namespace nlp {
9
10template <typename Scalar>
12 MatrixRef Jout) const {
13 const int nr = (int)z.size();
14 assert(nr == Jout.rows());
15 ActiveType active_set(nr);
16 computeActiveSet(z, active_set);
17 for (int i = 0; i < nr; i++) {
19 if (active_set(i)) {
20 Jout.row(i).setZero();
21 }
22 }
23}
24
25template <typename Scalar>
27 const ConstVectorRef &z, MatrixRef Jout) const {
28 const int nr = (int)z.size();
29 assert(nr == Jout.rows());
30 ActiveType active_set(nr);
31 computeActiveSet(z, active_set);
32 for (int i = 0; i < nr; i++) {
34 if (!active_set(i)) {
35 Jout.row(i).setZero();
36 }
37 }
38}
39
40} // namespace nlp
41} // namespace proxsuite
Main package namespace.
Definition bcl-params.hpp:5
virtual void applyProjectionJacobian(const ConstVectorRef &z, MatrixRef Jout) const
Apply a jacobian of the projection/proximal operator to a matrix.
virtual void computeActiveSet(const ConstVectorRef &z, Eigen::Ref< ActiveType > out) const =0
virtual void applyNormalConeProjectionJacobian(const ConstVectorRef &z, MatrixRef Jout) const
Apply the jacobian of the projection on the normal cone.