eigenpy
3.12.0
Bindings between Numpy and Eigen using Boost.Python
Loading...
Searching...
No Matches
BiCGSTAB.hpp
1
/*
2
* Copyright 2025 INRIA
3
*/
4
5
#ifndef __eigenpy_solvers_bicgstab_hpp__
6
#define __eigenpy_solvers_bicgstab_hpp__
7
8
#include <Eigen/IterativeLinearSolvers>
9
10
#include "eigenpy/fwd.hpp"
11
#include "eigenpy/solvers/IterativeSolverBase.hpp"
12
13
namespace
eigenpy
{
14
15
template
<
typename
BiCGSTAB>
16
struct
BiCGSTABVisitor
17
:
public
boost::python::def_visitor<BiCGSTABVisitor<BiCGSTAB>> {
18
typedef
typename
BiCGSTAB::MatrixType MatrixType;
19
20
template
<
class
PyClass>
21
void
visit(PyClass& cl)
const
{
22
cl.def(bp::init<>(
"Default constructor"
))
23
.def(bp::init<MatrixType>(
24
bp::arg(
"A"
),
25
"Initialize the solver with matrix A for further || Ax - b || "
26
"solving.\n"
27
"This constructor is a shortcut for the default constructor "
28
"followed by a call to compute()."
));
29
}
30
31
static
void
expose
(
const
std::string& name =
"BiCGSTAB"
) {
32
bp::class_<BiCGSTAB, boost::noncopyable>(name.c_str(), bp::no_init)
33
.def(
IterativeSolverVisitor<BiCGSTAB>
())
34
.def(
BiCGSTABVisitor<BiCGSTAB>
())
35
.def(
IdVisitor<BiCGSTAB>
());
36
}
37
};
38
39
}
// namespace eigenpy
40
41
#endif
// ifndef __eigenpy_solvers_bicgstab_hpp__
eigenpy
Definition
alignment.hpp:14
eigenpy::expose
void expose()
Call the expose function of a given type T.
Definition
expose.hpp:23
eigenpy::BiCGSTABVisitor
Definition
BiCGSTAB.hpp:17
eigenpy::IdVisitor
Add the Python method id to retrieving a unique id for a given object exposed with Boost....
Definition
id.hpp:18
eigenpy::IterativeSolverVisitor
Definition
IterativeSolverBase.hpp:16
include
eigenpy
solvers
BiCGSTAB.hpp
Generated by
1.14.0