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 <Eigen/IterativeLinearSolvers>
21 
22 #include "eigenpy/fwd.hpp"
24 
25 namespace eigenpy {
26 
27 template <typename ConjugateGradient>
29  : public boost::python::def_visitor<
30  ConjugateGradientVisitor<ConjugateGradient> > {
31  typedef typename ConjugateGradient::MatrixType MatrixType;
32 
33  template <class PyClass>
34  void visit(PyClass& cl) const {
36  .def(bp::init<>("Default constructor"))
37  .def(bp::init<MatrixType>(
38  bp::arg("A"),
39  "Initialize the solver with matrix A for further Ax=b 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(const std::string& name = "ConjugateGradient") {
45  bp::class_<ConjugateGradient, boost::noncopyable>(name.c_str(), bp::no_init)
47  }
48 };
49 
50 } // namespace eigenpy
51 
52 #endif // ifndef __eigenpy_conjugate_gradient_hpp__
IterativeSolverBase.hpp
fwd.hpp
eigenpy::ConjugateGradientVisitor
Definition: ConjugateGradient.hpp:28
eigenpy::IterativeSolverVisitor
Definition: IterativeSolverBase.hpp:26
eigenpy
Definition: alignment.hpp:14
eigenpy::ConjugateGradientVisitor::MatrixType
ConjugateGradient::MatrixType MatrixType
Definition: ConjugateGradient.hpp:31
setup.name
name
Definition: setup.in.py:179
eigenpy::ConjugateGradientVisitor::expose
static void expose(const std::string &name="ConjugateGradient")
Definition: ConjugateGradient.hpp:44
eigenpy::ConjugateGradientVisitor::visit
void visit(PyClass &cl) const
Definition: ConjugateGradient.hpp:34


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Tue Jan 23 2024 03:15:01