LeastSquaresConjugateGradient.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017-2018, 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_least_square_conjugate_gradient_hpp__
18 #define __eigenpy_least_square_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 LeastSquaresConjugateGradient>
32  : public boost::python::def_visitor< LeastSquaresConjugateGradientVisitor<LeastSquaresConjugateGradient> >
33  {
34  typedef Eigen::MatrixXd MatrixType;
35 
36  template<class PyClass>
37  void visit(PyClass& cl) const
38  {
39  cl
40  .def(bp::init<>("Default constructor"))
41  .def(bp::init<MatrixType>(bp::arg("A"),"Initialize the solver with matrix A for further || Ax - b || solving.\n"
42  "This constructor is a shortcut for the default constructor followed by a call to compute()."))
43  ;
44 
45  }
46 
47  static void expose()
48  {
49  bp::class_<LeastSquaresConjugateGradient,boost::noncopyable>("LeastSquaresConjugateGradient",
50  bp::no_init)
53  ;
54 
55  }
56 
57  };
58 
59 } // namespace eigenpy
60 
61 #endif // ifndef __eigenpy_least_square_conjugate_gradient_hpp__


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