aligator  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
expose-cholmod-solver.cpp
Go to the documentation of this file.
1#ifdef ALIGATOR_WITH_CHOLMOD
4
5namespace aligator::python {
6
7using lqr_t = gar::LQRProblemTpl<context::Scalar>;
8using cholmod_solver_t = gar::CholmodLqSolver<context::Scalar>;
9
10void exposeCholmodSolver() {
11 bp::class_<cholmod_solver_t, boost::noncopyable>(
12 "CholmodLqSolver",
13 "A wrapper for CHOLMOD to solve the linear system for the LQ step.",
14 bp::no_init)
15 .def(bp::init<const lqr_t &, uint>(
16 ("self"_a, "problem", "numRefinementSteps"_a = 1)))
17 .def_readonly("kktMatrix", &cholmod_solver_t::kktMatrix)
18 .def_readonly("kktRhs", &cholmod_solver_t::kktRhs)
19 .def("backward", &cholmod_solver_t::backward, ("self"_a, "mudyn", "mueq"))
20 .def("forward", &cholmod_solver_t::forward,
21 ("self"_a, "xs", "us", "vs", "lbdas"))
22 .add_property("sparse_residual", &cholmod_solver_t::computeSparseResidual,
23 "Sparse problem residual.")
24 .def_readonly("cholmod", &cholmod_solver_t::cholmod)
25 .def_readwrite("numRefinementSteps",
26 &cholmod_solver_t::numRefinementSteps);
27}
28
29} // namespace aligator::python
30#endif
The Python bindings.
Definition blk-matrix.hpp:5
LQRProblemTpl< context::Scalar > lqr_t