Commit cc73406a authored by Carlos Mastalli's avatar Carlos Mastalli
Browse files

[cleanup] Formatted the code

parent 624e8eaf
///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (C) 2019-2021, LAAS-CNRS, University of Edinburgh
// Copyright (C) 2019-2022, LAAS-CNRS, University of Edinburgh
// Copyright note valid unless otherwise stated in individual files.
// All rights reserved.
///////////////////////////////////////////////////////////////////////////////
......@@ -93,14 +93,18 @@ void exposeStateAbstract() {
":param dx: velocity vector (dim state.ndx).\n"
":param Jin: input matrix (number of rows = state.nv).\n"
":param firstsecond: derivative w.r.t x or dx")
.add_property("nx", bp::make_function(&StateAbstract_wrap::get_nx),
bp::make_setter(&StateAbstract_wrap::nx_,bp::return_internal_reference<>()), "dimension of state tuple")
.add_property("nx", bp::make_function(&StateAbstract_wrap::get_nx),
bp::make_setter(&StateAbstract_wrap::nx_, bp::return_internal_reference<>()),
"dimension of state tuple")
.add_property("ndx", bp::make_function(&StateAbstract_wrap::get_ndx),
bp::make_setter(&StateAbstract_wrap::ndx_,bp::return_internal_reference<>()), "dimension of the tangent space of the state manifold")
bp::make_setter(&StateAbstract_wrap::ndx_, bp::return_internal_reference<>()),
"dimension of the tangent space of the state manifold")
.add_property("nq", bp::make_function(&StateAbstract_wrap::get_nq),
bp::make_setter(&StateAbstract_wrap::nq_,bp::return_internal_reference<>()), "dimension of the configuration tuple")
bp::make_setter(&StateAbstract_wrap::nq_, bp::return_internal_reference<>()),
"dimension of the configuration tuple")
.add_property("nv", bp::make_function(&StateAbstract_wrap::get_nv),
bp::make_setter(&StateAbstract_wrap::nv_,bp::return_internal_reference<>()), "dimension of tangent space of the configuration manifold")
bp::make_setter(&StateAbstract_wrap::nv_, bp::return_internal_reference<>()),
"dimension of tangent space of the configuration manifold")
.add_property("has_limits", bp::make_function(&StateAbstract_wrap::get_has_limits),
"indicates whether problem has finite state limits")
.add_property("lb", bp::make_getter(&StateAbstract_wrap::lb_, bp::return_internal_reference<>()),
......
......@@ -22,11 +22,11 @@ namespace python {
class StateAbstract_wrap : public StateAbstract, public bp::wrapper<StateAbstract> {
public:
using StateAbstract::lb_;
using StateAbstract::ub_;
using StateAbstract::nx_;
using StateAbstract::ndx_;
using StateAbstract::nq_;
using StateAbstract::nv_;
using StateAbstract::nx_;
using StateAbstract::ub_;
StateAbstract_wrap(int nx, int ndx) : StateAbstract(nx, ndx), bp::wrapper<StateAbstract>() {}
......@@ -249,8 +249,8 @@ class StateAbstract_wrap : public StateAbstract, public bp::wrapper<StateAbstrac
throw_pretty("Invalid argument: "
<< "dx has wrong dimension (it should be " + std::to_string(ndx_) + ")");
}
return bp::call<Eigen::MatrixXd>(this->get_override("JintegrateTransport").ptr(), (Eigen::VectorXd)x, (Eigen::VectorXd)dx, (Eigen::MatrixXd)Jin,
firstsecond);
return bp::call<Eigen::MatrixXd>(this->get_override("JintegrateTransport").ptr(), (Eigen::VectorXd)x,
(Eigen::VectorXd)dx, (Eigen::MatrixXd)Jin, firstsecond);
}
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment