20 bp::class_<StageConstraint>(
22 "A stage-wise constraint, of the form :math:`c(x,u) \\leq 0 c(x,u)`.\n"
23 ":param f: underlying function\n"
24 ":param cs: constraint set",
28 bp::default_call_policies(),
29 (
"func"_a,
"cstr_set")),
30 "Contruct a StageConstraint from a StageFunction and a constraint "
32 .def_readwrite(
"func", &StageConstraint::func)
33 .def_readwrite(
"set", &StageConstraint::set)
34 .add_property(
"nr", &StageConstraint::nr,
"Get constraint dimension.");
36 bp::class_<ConstraintStack>(
"ConstraintStack",
"The stack of constraint.",
38 .add_property(
"size", &ConstraintStack::size,
39 "Get number of individual constraints.")
41 bp::make_function(&ConstraintStack::dims,
42 bp::return_internal_reference<>()),
43 "Get the individual dimensions of all constraints.")
44 .def(eigenpy::details::overload_base_get_item_for_std_vector<
46 .add_property(
"total_dim", &ConstraintStack::totalDim,
47 "Get total dimension of all constraints.");
ConstraintSetBase< Scalar > ConstraintSet
ConstraintStackTpl< Scalar > ConstraintStack
StageConstraintTpl< Scalar > StageConstraint