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 <Eigen/IterativeLinearSolvers>
21 
22 #include "eigenpy/fwd.hpp"
24 
25 namespace eigenpy {
26 
27 template <typename LeastSquaresConjugateGradient>
29  : public boost::python::def_visitor<LeastSquaresConjugateGradientVisitor<
30  LeastSquaresConjugateGradient> > {
31  typedef Eigen::MatrixXd MatrixType;
32 
33  template <class PyClass>
34  void visit(PyClass& cl) const {
35  cl.def(bp::init<>("Default constructor"))
36  .def(bp::init<MatrixType>(
37  bp::arg("A"),
38  "Initialize the solver with matrix A for further || Ax - b || "
39  "solving.\n"
40  "This constructor is a shortcut for the default constructor "
41  "followed by a call to compute()."));
42  }
43 
44  static void expose() {
45  bp::class_<LeastSquaresConjugateGradient, boost::noncopyable>(
46  "LeastSquaresConjugateGradient", bp::no_init)
49  LeastSquaresConjugateGradient>());
50  }
51 };
52 
53 } // namespace eigenpy
54 
55 #endif // ifndef __eigenpy_least_square_conjugate_gradient_hpp__


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Fri Jun 2 2023 02:10:26