19 proxsuite::nlp::python::register_polymorphic_to_python<PolyUnaryFunction>();
20 using unary_eval_t = void (UnaryFunction::*)(
const ConstVectorRef &,
21 StageFunctionData &)
const;
23 void (UnaryFunction::*)(
const ConstVectorRef &,
const ConstVectorRef &,
24 StageFunctionData &)
const;
26 void (UnaryFunction::*)(
const ConstVectorRef &,
const ConstVectorRef &,
27 StageFunctionData &)
const;
29 void (UnaryFunction::*)(
const ConstVectorRef &,
const ConstVectorRef &,
30 const ConstVectorRef &, StageFunctionData &)
32 bp::class_<PyUnaryFunction<>, bp::bases<StageFunction>, boost::noncopyable>(
34 "Base class for unary functions of the form :math:`x \\mapsto f(x)`.",
36 .def(bp::init<const int, const int, const int>(
37 (
"self"_a,
"ndx1",
"nu",
"nr")))
38 .def(
"evaluate", bp::pure_virtual<unary_eval_t>(&UnaryFunction::evaluate),
39 (
"self"_a,
"x",
"data"))
40 .def<full_eval_t>(
"evaluate", &UnaryFunction::evaluate,
41 (
"self"_a,
"x",
"u",
"data"))
42 .def(
"computeJacobians",
43 bp::pure_virtual<unary_eval_t>(&UnaryFunction::computeJacobians),
44 (
"self"_a,
"x",
"data"))
45 .def<full_eval_t>(
"computeJacobians", &UnaryFunction::computeJacobians,
46 (
"self"_a,
"x",
"u",
"data"))
48 "computeVectorHessianProducts",
49 &UnaryFunction::computeVectorHessianProducts,
51 (
"self"_a,
"x",
"lbda",
"data"))
52 .def<full_vhp_t>(
"computeVectorHessianProducts",
53 &UnaryFunction::computeVectorHessianProducts,
54 (
"self"_a,
"x",
"u",
"lbda",
"data"))
StageFunctionTpl< Scalar > StageFunction
UnaryFunctionTpl< Scalar > UnaryFunction
StageFunctionDataTpl< Scalar > StageFunctionData