17 #ifndef __eigenpy_bfgs_preconditioners_hpp__ 18 #define __eigenpy_bfgs_preconditioners_hpp__ 21 #include <Eigen/IterativeLinearSolvers> 30 template<
typename Preconditioner>
32 :
public bp::def_visitor< BFGSPreconditionerBaseVisitor<Preconditioner> >
36 template<
class PyClass>
44 .def(
"update",(
const Preconditioner& (Preconditioner::*)(
const VectorType &,
const VectorType &)
const)&Preconditioner::update,bp::args(
"s",
"y"),
"Update the BFGS estimate of the matrix A.",bp::return_value_policy<bp::reference_existing_object>())
45 .def(
"reset",&Preconditioner::reset,
"Reset the BFGS estimate.")
52 bp::class_<Preconditioner>(
name,
61 template<
typename Preconditioner>
63 :
public bp::def_visitor< LimitedBFGSPreconditionerBaseVisitor<Preconditioner> >
65 template<
class PyClass>
71 .def(
"resize",&Preconditioner::resize,bp::arg(
"dim"),
"Resizes the preconditionner with size dim.",bp::return_value_policy<bp::reference_existing_object>())
78 bp::class_<Preconditioner>(name.c_str(),
89 #endif // ifndef __eigenpy_bfgs_preconditioners_hpp__
static void expose(const std::string &name)
void visit(PyClass &cl) const
void visit(PyClass &cl) const
Eigen::VectorXd VectorType
static void expose(const std::string &name)