proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
state-residual.hpp
Go to the documentation of this file.
1
5#pragma once
6
10
11namespace proxsuite {
12namespace nlp {
13
18template <typename _Scalar>
20public:
21 using Scalar = _Scalar;
23
25 using Base::operator();
28
30 VectorXs target_;
32
34 const ConstVectorRef &target)
35 : Base(space->nx(), space->ndx(), space->ndx()), target_(target),
36 space_(space) {
37 if (!space->isNormalized(target_)) {
39 "Target parameter is not a valid element of the manifold.");
40 }
41 }
42
43 VectorXs operator()(const ConstVectorRef &x) const {
44 return space_->difference(target_, x);
45 }
46
47 void computeJacobian(const ConstVectorRef &x, MatrixRef Jout) const {
48 space_->Jdifference(target_, x, Jout, 1);
49 }
50};
51
52} // namespace nlp
53} // namespace proxsuite
#define PROXSUITE_NLP_RUNTIME_ERROR(msg)
Definition exceptions.hpp:8
Base definitions for function classes.
#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
Definition math.hpp:26
Main package namespace.
Definition bcl-params.hpp:5
virtual void computeJacobian(const ConstVectorRef &x, MatrixRef Jout) const=0
Twice-differentiable function, with method Jacobian and vector-hessian product evaluation.
Definition fwd.hpp:76
void computeJacobian(const ConstVectorRef &x, MatrixRef Jout) const
Jacobian matrix of the constraint function.
VectorXs target_
Target point on the space.
VectorXs operator()(const ConstVectorRef &x) const
Evaluate the residual at a given point x.
ManifoldDifferenceToPoint(const polymorphic< Manifold > &space, const ConstVectorRef &target)