21 using context::StageConstraint;
24 bp::class_<StageConstraint>(
26 "A stage-wise constraint, of the form :math:`c(x,u) \\leq 0 c(x,u)`.\n"
27 ":param f: underlying function\n"
28 ":param cs: constraint set",
33 eigenpy::deprecation_warning_policy<>(
34 "This class has been deprecated and will be removed in a "
35 "future version of aligator."),
36 (
"func"_a,
"cstr_set")),
37 "Contruct a StageConstraint from a StageFunction and a constraint "
39 .def_readwrite(
"func", &StageConstraint::func)
40 .def_readwrite(
"set", &StageConstraint::set)
42 "nr", +[](StageConstraint
const &el) {
return el.func->nr; },
43 "Get constraint dimension.");
45 bp::class_<ConstraintStack>(
"ConstraintStack",
"The stack of constraint.",
47 .add_property(
"size", &ConstraintStack::size,
48 "Get number of individual constraints.")
49 .def_readonly(
"funcs", &ConstraintStack::funcs)
50 .def_readonly(
"sets", &ConstraintStack::sets)
52 bp::make_function(&ConstraintStack::dims,
53 bp::return_internal_reference<>()),
54 "Get the individual dimensions of all constraints.")
55 .add_property(
"total_dim", &ConstraintStack::totalDim,
56 "Get total dimension of all constraints.");
ConstraintSetTpl< Scalar > ConstraintSet