Main Page
Namespaces
Classes
Files
File List
File Members
include
eigenpy
solvers
SparseSolverBase.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_sparse_solver_base_hpp__
18
#define __eigenpy_sparse_solver_base_hpp__
19
20
#include "
eigenpy/fwd.hpp
"
21
22
namespace
eigenpy
23
{
24
25
namespace
bp
=
boost::python
;
26
27
template
<
typename
SparseSolver>
28
struct
SparseSolverVisitor
29
:
public
bp::def_visitor< SparseSolverVisitor<SparseSolver> >
30
{
31
32
typedef
Eigen::VectorXd
VectorType
;
33
34
template
<
class
PyClass>
35
void
visit
(PyClass& cl)
const
36
{
37
cl
38
.def(
"solve"
,&
solve
,bp::arg(
"b"
),
39
"Returns the solution x of Ax = b using the current decomposition of A."
)
40
;
41
42
}
43
44
private
:
45
46
static
VectorType
solve
(SparseSolver &
self
,
const
VectorType & b)
47
{
48
return
self
.solve(b);
49
}
50
51
};
52
53
54
55
}
// namespace eigenpy
56
57
#endif // ifndef __eigenpy_sparse_solver_base_hpp__
eigenpy::SparseSolverVisitor::VectorType
Eigen::VectorXd VectorType
Definition:
SparseSolverBase.hpp:32
eigenpy::SparseSolverVisitor::visit
void visit(PyClass &cl) const
Definition:
SparseSolverBase.hpp:35
fwd.hpp
eigenpy
Definition:
angle-axis.hpp:13
eigenpy::SparseSolverVisitor
Definition:
SparseSolverBase.hpp:28
boost::python
Definition:
details.hpp:22
eigenpy::SparseSolverVisitor::solve
static VectorType solve(SparseSolver &self, const VectorType &b)
Definition:
SparseSolverBase.hpp:46
eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Apr 17 2021 02:37:59