1#include "proxsuite-nlp/python/fwd.hpp"
9struct FunctionWrap : context::Function, bp::wrapper<context::Function> {
13 using context::Function::BaseFunctionTpl;
16 bp::override f = get_override(
"__call__");
21struct C1FunctionWrap : context::C1Function, bp::wrapper<context::C1Function> {
24 using context::C1Function::C1FunctionTpl;
27 bp::override f = get_override(
"__call__");
32 Jout.resize(this->
nr(), this->
ndx());
33 get_override(
"computeJacobian")(x, Jout);
37struct C2FunctionWrap : context::C2Function, bp::wrapper<context::C2Function> {
40 using context::C2Function::C2FunctionTpl;
43 bp::override f = get_override(
"__call__");
48 Jout.resize(this->
nr(), this->
ndx());
49 get_override(
"computeJacobian")(x, Jout);
53 MatrixRef Hout)
const {
54 Hout.resize(this->
ndx(), this->
ndx());
55 if (bp::override f = this->get_override(
"vectorHessianProduct")) {
62 MatrixXs getVHP(
const ConstVectorRef &x,
const ConstVectorRef &v)
const {
63 using context::MatrixXs;
64 MatrixXs Hout(this->ndx_, this->ndx_);
69 void default_vhp(
const ConstVectorRef &x,
const ConstVectorRef &v,
70 MatrixRef Hout)
const {
Base definitions for function classes.
#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
virtual void vectorHessianProduct(const ConstVectorRef &, const ConstVectorRef &, MatrixRef Hout) const
VectorXs operator()(const ConstVectorRef &x) const
Evaluate the residual at a given point x.
void computeJacobian(const ConstVectorRef &x, MatrixRef Jout) const
Jacobian matrix of the constraint function.
void computeJacobian(const ConstVectorRef &x, MatrixRef Jout) const
Jacobian matrix of the constraint function.
void vectorHessianProduct(const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Hout) const
Vector-hessian product.
VectorXs operator()(const ConstVectorRef &x) const
Evaluate the residual at a given point x.
VectorXs operator()(const ConstVectorRef &x) const
Evaluate the residual at a given point x.