[cpp]Reformat code
#include <bindings.hpp>
#include <string>
#include <toppra/constraint.hpp>
+#include <toppra/constraint/linear_joint_acceleration.hpp>
+#include <toppra/constraint/linear_joint_velocity.hpp>
#include <toppra/geometric_path.hpp>
#include <toppra/toppra.hpp>
-#include <toppra/constraint/linear_joint_velocity.hpp>
-#include <toppra/constraint/linear_joint_acceleration.hpp>
namespace py = pybind11;
@@ -41,31 +41,34 @@ PYBIND11_MODULE(toppra_int, m) {
// Abstract class must be binded for derived classes to work
py::class_<LinearConstraint>(m, "_LinearConstraint");
-
- py::class_<constraint::LinearJointVelocity, LinearConstraint>(m, "LinearJointVelocity")
+ py::class_<constraint::LinearJointVelocity, LinearConstraint>(m,
+ "LinearJointVelocity")
.def(py::init<const Vector&, const Vector&>())
.def_property_readonly("nbConstraints", &LinearConstraint::nbConstraints)
.def_property_readonly("nbVariables", &LinearConstraint::nbVariables)
- .def_property_readonly("hasLinearInequalities", &LinearConstraint::hasLinearInequalities)
+ .def_property_readonly("hasLinearInequalities",
+ &LinearConstraint::hasLinearInequalities)
.def_property_readonly("hasUbounds", &LinearConstraint::hasUbounds)
.def_property_readonly("hasXbounds", &LinearConstraint::hasXbounds)
- .def_property(
- "discretizationType",
- (DiscretizationType (LinearConstraint::*)() const) &LinearConstraint::discretizationType,
- (void (LinearConstraint::*)(DiscretizationType)) &LinearConstraint::discretizationType)
- ;
- py::class_<constraint::LinearJointAcceleration, LinearConstraint>(m, "LinearJointAcceleration")
+ .def_property("discretizationType",
+ (DiscretizationType(LinearConstraint::*)() const) &
+ LinearConstraint::discretizationType,
+ (void (LinearConstraint::*)(DiscretizationType)) &
+ LinearConstraint::discretizationType);
+ py::class_<constraint::LinearJointAcceleration, LinearConstraint>(
+ m, "LinearJointAcceleration")
.def(py::init<const Vector&, const Vector&>())
.def_property_readonly("nbConstraints", &LinearConstraint::nbConstraints)
.def_property_readonly("nbVariables", &LinearConstraint::nbVariables)
- .def_property_readonly("hasLinearInequalities", &LinearConstraint::hasLinearInequalities)
+ .def_property_readonly("hasLinearInequalities",
+ &LinearConstraint::hasLinearInequalities)
.def_property_readonly("hasUbounds", &LinearConstraint::hasUbounds)
.def_property_readonly("hasXbounds", &LinearConstraint::hasXbounds)
- .def_property(
- "discretizationType",
- (DiscretizationType (LinearConstraint::*)() const) &LinearConstraint::discretizationType,
- (void (LinearConstraint::*)(DiscretizationType)) &LinearConstraint::discretizationType)
- ;
+ .def_property("discretizationType",
+ (DiscretizationType(LinearConstraint::*)() const) &
+ LinearConstraint::discretizationType,
+ (void (LinearConstraint::*)(DiscretizationType)) &
+ LinearConstraint::discretizationType);
}
} // namespace python
} // namespace toppra
