17 #ifndef __eigenpy_bfgs_preconditioners_hpp__ 18 #define __eigenpy_bfgs_preconditioners_hpp__ 20 #include <Eigen/IterativeLinearSolvers> 27 template <
typename Preconditioner>
29 :
public bp::def_visitor<BFGSPreconditionerBaseVisitor<Preconditioner> > {
31 template <
class PyClass>
35 "Returns the number of rows in the preconditioner.")
37 "Returns the number of cols in the preconditioner.")
39 "Returns the dimension of the BFGS preconditioner")
41 (
const Preconditioner& (Preconditioner::*)(
const VectorType&,
44 Preconditioner::update,
45 bp::args(
"s",
"y"),
"Update the BFGS estimate of the matrix A.",
46 bp::return_value_policy<bp::reference_existing_object>())
47 .def(
"reset", &Preconditioner::reset,
"Reset the BFGS estimate.");
51 bp::class_<Preconditioner>(
name, bp::no_init)
56 template <
typename Preconditioner>
58 :
public bp::def_visitor<
59 LimitedBFGSPreconditionerBaseVisitor<Preconditioner> > {
60 template <
class PyClass>
64 .def(
"resize", &Preconditioner::resize, bp::arg(
"dim"),
65 "Resizes the preconditionner with size dim.",
66 bp::return_value_policy<bp::reference_existing_object>());
70 bp::class_<Preconditioner>(name.c_str(), bp::no_init)
77 #endif // ifndef __eigenpy_bfgs_preconditioners_hpp__
void visit(PyClass &cl) const
static void expose(const std::string &name)
void visit(PyClass &cl) const
Eigen::VectorXd VectorType
static void expose(const std::string &name)