proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
module.cpp
Go to the documentation of this file.
1#include <eigenpy/std-vector.hpp>
2
6
8
9namespace proxsuite {
10namespace nlp {
11namespace python {
14 using eigenpy::StdVectorPythonVisitor;
15
16 StdVectorPythonVisitor<std::vector<int>, true>::expose("StdVec_int");
17 StdVectorPythonVisitor<std::vector<context::Scalar>, true>::expose(
18 "StdVec_Scalar");
19 StdVectorPythonVisitor<context::VectorOfVectors, true>::expose(
20 "StdVec_Vector");
21 StdVectorPythonVisitor<std::vector<context::MatrixXs>, true>::expose(
22 "StdVec_Matrix");
23 StdVectorPythonVisitor<std::vector<context::VectorXBool>, false>::expose(
24 "StdVec_VecBool");
25 StdVectorPythonVisitor<context::VectorOfRef, true>::expose("StdVec_VecRef");
26 StdVectorPythonVisitor<std::vector<context::MatrixRef>, true>::expose(
27 "StdVec_MatRef");
28}
29
30} // namespace python
31} // namespace nlp
32} // namespace proxsuite
33
34BOOST_PYTHON_MODULE(MODULE_NAME) {
35 using namespace proxsuite::nlp::python;
36
37 bp::docstring_options module_docstring_options(true, true, true);
38
39 bp::scope().attr("__version__") = proxsuite::nlp::printVersion();
40 eigenpy::enableEigenPy();
41 eigenpy::enableEigenPySpecific<context::VectorXBool>();
42
43 bp::import("warnings");
44#ifdef PROXSUITE_NLP_WITH_PINOCCHIO
45 bp::import("pinocchio");
46#endif
47
48 exposeContainerTypes();
49 exposeFunctionTypes();
50 {
51 bp::scope man_scope = get_namespace("manifolds");
52 exposeManifolds();
53 }
54 {
55 bp::scope res_cope = get_namespace("residuals");
56 exposeResiduals();
57#ifdef PROXSUITE_NLP_WITH_PINOCCHIO
58 exposePinocchioResiduals();
59#endif
60 }
61 {
62 bp::scope cost_scope = get_namespace("costs");
63 exposeCost();
64 }
65 {
66 bp::scope cstr_scope = get_namespace("constraints");
67 exposeConstraints();
68 }
69 exposeProblem();
70 exposeResults();
71 exposeWorkspace();
72 exposeLdltRoutines();
73 exposeSolver();
74 {
75 bp::scope in_scope = get_namespace("helpers");
76 exposeCallbacks();
77 }
78 {
79 bp::scope autodiff_scope = get_namespace("autodiff");
80 exposeAutodiff();
81 }
82}
BOOST_PYTHON_MODULE(MODULE_NAME)
Definition module.cpp:34
void exposeContainerTypes()
Expose some useful container types.
Definition module.cpp:13
std::string printVersion(const std::string &delimiter=".")
Pretty-print the package version number.
Definition version.hpp:15
Main package namespace.
Definition bcl-params.hpp:5