///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (C) 2019-2023, LAAS-CNRS, University of Edinburgh
//                          Heriot-Watt University
// Copyright note valid unless otherwise stated in individual files.
// All rights reserved.
///////////////////////////////////////////////////////////////////////////////

#include "crocoddyl/core/solvers/box-ddp.hpp"

#include "python/crocoddyl/core/core.hpp"
#include "python/crocoddyl/utils/copyable.hpp"

namespace crocoddyl {
namespace python {

void exposeSolverBoxDDP() {
  bp::register_ptr_to_python<boost::shared_ptr<SolverBoxDDP> >();

  bp::class_<SolverBoxDDP, bp::bases<SolverDDP> >(
      "SolverBoxDDP",
      "Box-constrained DDP solver.\n\n"
      ":param shootingProblem: shooting problem (list of action models along "
      "trajectory.)",
      bp::init<boost::shared_ptr<ShootingProblem> >(
          bp::args("self", "problem"),
          "Initialize the vector dimension.\n\n"
          ":param problem: shooting problem."))
      .add_property("Quu_inv",
                    make_function(&SolverBoxDDP::get_Quu_inv,
                                  bp::return_internal_reference<>()),
                    "inverse of the Quu computed by the box QP")
      .def(CopyableVisitor<SolverBoxDDP>());
}

}  // namespace python
}  // namespace crocoddyl
