| 40 | namespace python { |
| 41 | |
| 42 | void DantzigBoxedLcpSolver(py::module& m) |
| 43 | { |
| 44 | ::py::class_< |
| 45 | dart::constraint::DantzigBoxedLcpSolver, |
| 46 | dart::constraint::BoxedLcpSolver, |
| 47 | std::shared_ptr<dart::constraint::DantzigBoxedLcpSolver>>( |
| 48 | m, "DantzigBoxedLcpSolver") |
| 49 | .def( |
| 50 | "getType", |
| 51 | +[](const dart::constraint::DantzigBoxedLcpSolver* self) |
| 52 | -> const std::string& { return self->getType(); }, |
| 53 | ::py::return_value_policy::reference_internal) |
| 54 | .def( |
| 55 | "solve", |
| 56 | +[](dart::constraint::DantzigBoxedLcpSolver* self, |
| 57 | int n, |
| 58 | double* A, |
| 59 | double* x, |
| 60 | double* b, |
| 61 | int nub, |
| 62 | double* lo, |
| 63 | double* hi, |
| 64 | int* findex, |
| 65 | bool earlyTermination) -> bool { |
| 66 | return self->solve( |
| 67 | n, A, x, b, nub, lo, hi, findex, earlyTermination); |
| 68 | }, |
| 69 | ::py::arg("n"), |
| 70 | ::py::arg("A"), |
| 71 | ::py::arg("x"), |
| 72 | ::py::arg("b"), |
| 73 | ::py::arg("nub"), |
| 74 | ::py::arg("lo"), |
| 75 | ::py::arg("hi"), |
| 76 | ::py::arg("findex"), |
| 77 | ::py::arg("earlyTermination")) |
| 78 | .def_static( |
| 79 | "getStaticType", |
| 80 | +[]() -> const std::string& { |
| 81 | return dart::constraint::DantzigBoxedLcpSolver::getStaticType(); |
| 82 | }, |
| 83 | ::py::return_value_policy::reference_internal); |
| 84 | } |
| 85 | |
| 86 | } // namespace python |
| 87 | } // namespace dart |
no test coverage detected