20 :
public boost::python::def_visitor<
21 GeneralizedSelfAdjointEigenSolverVisitor<_MatrixType>> {
22 typedef _MatrixType MatrixType;
23 typedef typename MatrixType::Scalar Scalar;
24 typedef Eigen::GeneralizedSelfAdjointEigenSolver<MatrixType> Solver;
26 template <
class PyClass>
27 void visit(PyClass& cl)
const {
28 cl.def(bp::init<>(
"Default constructor"))
29 .def(bp::init<Eigen::DenseIndex>(
30 bp::arg(
"size"),
"Default constructor with memory preallocation. "))
31 .def(bp::init<MatrixType, MatrixType, bp::optional<int>>(
32 bp::args(
"matA",
"matB",
"options"),
33 "Constructor: Computes generalized eigendecomposition of given " 37 &GeneralizedSelfAdjointEigenSolverVisitor::compute_proxy<
39 bp::args(
"self",
"A",
"B"),
40 "Computes generalized eigendecomposition of given matrix pencil. ",
44 (Solver::*)(
const MatrixType& A,
const MatrixType& B,
int)) &
46 bp::args(
"self",
"A",
"B",
"options"),
47 "Computes generalized eigendecomposition of given matrix pencil.",
52 static const std::string classname =
53 "GeneralizedSelfAdjointEigenSolver" + scalar_name<Scalar>::shortname();
57 static void expose(
const std::string& name) {
58 bp::class_<Solver, bp::bases<Eigen::SelfAdjointEigenSolver<MatrixType>>>(
59 name.c_str(), bp::no_init)
65 template <
typename MatrixType>
66 static Solver& compute_proxy(Solver& self,
const MatrixType& A,
67 const MatrixType& B) {
68 return self.compute(A, B);