ConjugateGradient.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017, Justin Carpentier, LAAS-CNRS
3  *
4  * This file is part of eigenpy.
5  * eigenpy is free software: you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public License
7  * as published by the Free Software Foundation, either version 3 of
8  * the License, or (at your option) any later version.
9  * eigenpy is distributed in the hope that it will be
10  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details. You should
13  * have received a copy of the GNU Lesser General Public License along
14  * with eigenpy. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef __eigenpy_conjugate_gradient_hpp__
18 #define __eigenpy_conjugate_gradient_hpp__
19 
20 #include "eigenpy/fwd.hpp"
21 #include <Eigen/IterativeLinearSolvers>
22 
24 
25 namespace eigenpy
26 {
27 
28  namespace bp = boost::python;
29 
30  template<typename ConjugateGradient>
32  : public boost::python::def_visitor< ConjugateGradientVisitor<ConjugateGradient> >
33  {
34  typedef typename ConjugateGradient::MatrixType MatrixType;
35 
36  template<class PyClass>
37  void visit(PyClass& cl) const
38  {
39  cl
41  .def(bp::init<>("Default constructor"))
42  .def(bp::init<MatrixType>(bp::arg("A"),"Initialize the solver with matrix A for further Ax=b solving.\n"
43  "This constructor is a shortcut for the default constructor followed by a call to compute()."))
44  ;
45 
46  }
47 
48  static void expose(const std::string & name = "ConjugateGradient")
49  {
50  bp::class_<ConjugateGradient,boost::noncopyable>(name.c_str(),
51  bp::no_init)
53  ;
54 
55  }
56 
57  };
58 
59 } // namespace eigenpy
60 
61 #endif // ifndef __eigenpy_conjugate_gradient_hpp__
static void expose(const std::string &name="ConjugateGradient")
ConjugateGradient::MatrixType MatrixType


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Apr 17 2021 02:37:59