Skip to content
Snippets Groups Projects
Commit 3a9a2197 authored by jcarpent's avatar jcarpent
Browse files

[Solvers] Add class name to expose for ConjugateGradient

parent bbfb8c12
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ namespace eigenpy ...@@ -37,6 +37,7 @@ namespace eigenpy
void visit(PyClass& cl) const void visit(PyClass& cl) const
{ {
cl cl
.def(IterativeSolverVisitor<ConjugateGradient>())
.def(bp::init<>("Default constructor")) .def(bp::init<>("Default constructor"))
.def(bp::init<MatrixType>(bp::arg("A"),"Initialize the solver with matrix A for further Ax=b solving.\n" .def(bp::init<MatrixType>(bp::arg("A"),"Initialize the solver with matrix A for further Ax=b solving.\n"
"This constructor is a shortcut for the default constructor followed by a call to compute().")) "This constructor is a shortcut for the default constructor followed by a call to compute()."))
...@@ -44,11 +45,10 @@ namespace eigenpy ...@@ -44,11 +45,10 @@ namespace eigenpy
} }
static void expose() static void expose(const std::string & name = "ConjugateGradient")
{ {
bp::class_<ConjugateGradient,boost::noncopyable>("ConjugateGradient", bp::class_<ConjugateGradient,boost::noncopyable>(name.c_str(),
bp::no_init) bp::no_init)
.def(IterativeSolverVisitor<ConjugateGradient>())
.def(ConjugateGradientVisitor<ConjugateGradient>()) .def(ConjugateGradientVisitor<ConjugateGradient>())
; ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment