29 template <
typename... Args>
void visit(bp::class_<Args...> &obj)
const {
30 obj.def_readwrite(
"verbose", &SolverType::verbose_,
31 "Verbosity level of the solver.")
32 .def_readwrite(
"max_iters", &SolverType::max_iters,
33 "Maximum number of iterations.")
34 .def_readwrite(
"ls_params", &SolverType::ls_params,
35 "Linesearch parameters.")
36 .def_readwrite(
"target_tol", &SolverType::target_tol_,
38 .def_readwrite(
"reg_init", &SolverType::reg_init)
39 .def_readwrite(
"preg", &SolverType::preg_)
40 .def_readwrite(
"force_initial_condition",
41 &SolverType::force_initial_condition_,
42 "Set x0 to be fixed to the initial condition.")
43 .add_property(
"num_threads", &SolverType::getNumThreads)
44 .def(
"setNumThreads", &SolverType::setNumThreads,
45 (
"self"_a,
"num_threads"))
46 .def_readonly(
"results", &SolverType::results_,
"Solver results.")
47 .def_readonly(
"workspace", &SolverType::workspace_,
"Solver workspace.")
48 .def(
"setup", &SolverType::setup, (
"self"_a,
"problem"),
49 "Allocate solver workspace and results data for the problem.")
50 .def(
"registerCallback", &SolverType::registerCallback,
51 (
"self"_a,
"name",
"cb"),
"Add a callback to the solver.")
52 .def(
"getCallbackNames", &SolverType::getCallbackNames,
"self"_a,
53 "Get names of registered callbacks.")
54 .def(
"removeCallback", &SolverType::removeCallback, (
"self"_a,
"key"),
57 .def(
"clearCallbacks", &SolverType::clearCallbacks, (
"self"_a),