1#include "proxsuite-nlp/python/fwd.hpp" 
   10  using context::Constraint;
 
   11  using context::Manifold;
 
   12  using context::Problem;
 
   14  bp::class_<Problem>(
"Problem", 
"Problem definition class.", bp::no_init)
 
   15      .def(bp::init<
const polymorphic<Manifold> &, shared_ptr<context::Cost>,
 
   16                    const std::vector<Constraint> &>(
 
   17          (
"self"_a, 
"space", 
"cost", 
"constraints"_a = bp::list())))
 
   18      .def_readwrite(
"cost", &Problem::cost_, 
"The cost function instance.")
 
   19      .def_readwrite(
"manifold", &Problem::manifold_, 
"Problem manifold.")
 
   20      .add_property(
"num_constraint_blocks", &Problem::getNumConstraints,
 
   21                    "Get the number of constraint blocks.")
 
   22      .add_property(
"total_constraint_dim", &Problem::getTotalConstraintDim,
 
   23                    "Get the total dimension of the constraints.")
 
   24      .add_property(
"nx", &Problem::nx, 
"Get the problem tangent space dim.")
 
   25      .add_property(
"ndx", &Problem::ndx, 
"Get the problem tangent space dim.")
 
   26      .def(
"add_constraint", &Problem::addConstraint<const Constraint &>,
 
   27           (
"self"_a, 
"cstr"), 
"Add a constraint to the problem.");