6 #ifndef __eigenpy_bfgs_preconditioners_hpp__
7 #define __eigenpy_bfgs_preconditioners_hpp__
9 #include <Eigen/IterativeLinearSolvers>
16 template <
typename Preconditioner>
18 :
public bp::def_visitor<BFGSPreconditionerBaseVisitor<Preconditioner> > {
20 template <
class PyClass>
24 "Returns the number of rows in the preconditioner.")
26 "Returns the number of cols in the preconditioner.")
28 "Returns the dimension of the BFGS preconditioner")
30 (
const Preconditioner& (Preconditioner::*)(
const VectorType&,
33 Preconditioner::update,
34 bp::args(
"s",
"y"),
"Update the BFGS estimate of the matrix A.",
35 bp::return_value_policy<bp::reference_existing_object>())
36 .def(
"reset", &Preconditioner::reset,
"Reset the BFGS estimate.");
40 bp::class_<Preconditioner>(
name, bp::no_init)
46 template <
typename Preconditioner>
48 :
public bp::def_visitor<
49 LimitedBFGSPreconditionerBaseVisitor<Preconditioner> > {
50 template <
class PyClass>
54 .def(
"resize", &Preconditioner::resize, bp::arg(
"dim"),
55 "Resizes the preconditionner with size dim.",
56 bp::return_value_policy<bp::reference_existing_object>());
60 bp::class_<Preconditioner>(
name.c_str(), bp::no_init)
68 #endif // ifndef __eigenpy_bfgs_preconditioners_hpp__