solvers/SparseSolverBase.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017 CNRS
3  */
4 
5 #ifndef __eigenpy_sparse_solver_base_hpp__
6 #define __eigenpy_sparse_solver_base_hpp__
7 
8 #include "eigenpy/fwd.hpp"
9 
10 namespace eigenpy {
11 
12 template <typename SparseSolver>
14  : public bp::def_visitor<SparseSolverVisitor<SparseSolver> > {
15  typedef Eigen::VectorXd VectorType;
16 
17  template <class PyClass>
18  void visit(PyClass& cl) const {
19  cl.def("solve", &solve, bp::arg("b"),
20  "Returns the solution x of Ax = b using the current decomposition "
21  "of A.");
22  }
23 
24  private:
25  static VectorType solve(SparseSolver& self, const VectorType& b) {
26  return self.solve(b);
27  }
28 };
29 
30 } // namespace eigenpy
31 
32 #endif // ifndef __eigenpy_sparse_solver_base_hpp__
eigenpy::SparseSolverVisitor::solve
static VectorType solve(SparseSolver &self, const VectorType &b)
Definition: solvers/SparseSolverBase.hpp:25
eigenpy::SparseSolverVisitor::visit
void visit(PyClass &cl) const
Definition: solvers/SparseSolverBase.hpp:18
fwd.hpp
eigenpy::SparseSolverVisitor::VectorType
Eigen::VectorXd VectorType
Definition: solvers/SparseSolverBase.hpp:15
eigenpy
Definition: alignment.hpp:14
eigenpy::SparseSolverVisitor
Definition: solvers/SparseSolverBase.hpp:13


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Nov 2 2024 02:14:45