19 :
public boost::python::def_visitor<RealQZVisitor<_MatrixType>> {
20 typedef _MatrixType MatrixType;
21 typedef typename MatrixType::Scalar Scalar;
22 typedef Eigen::RealQZ<MatrixType> Solver;
24 template <
class PyClass>
25 void visit(PyClass& cl)
const {
27 bp::init<Eigen::DenseIndex>(bp::arg(
"size"),
"Default constructor. "))
28 .def(bp::init<MatrixType, MatrixType, bp::optional<bool>>(
29 bp::args(
"A",
"B",
"computeQZ"),
30 "Constructor; computes real QZ decomposition of given matrices. "))
32 .def(
"compute", &RealQZVisitor::compute_proxy<MatrixType>,
33 bp::args(
"self",
"A",
"B"),
34 "Computes QZ decomposition of given matrix. ",
38 (Solver::*)(
const MatrixType& A,
const MatrixType& B,
bool)) &
40 bp::args(
"self",
"A",
"B",
"computeEigenvectors"),
41 "Computes QZ decomposition of given matrix. ", bp::return_self<>())
43 .def(
"info", &Solver::info, bp::arg(
"self"),
44 "NumericalIssue if the input contains INF or NaN values or " 45 "overflow occured. Returns Success otherwise.")
47 .def(
"matrixQ", &Solver::matrixQ, bp::arg(
"self"),
48 "Returns matrix Q in the QZ decomposition. ",
49 bp::return_value_policy<bp::copy_const_reference>())
50 .def(
"matrixS", &Solver::matrixS, bp::arg(
"self"),
51 "Returns matrix S in the QZ decomposition. ",
52 bp::return_value_policy<bp::copy_const_reference>())
53 .def(
"matrixT", &Solver::matrixT, bp::arg(
"self"),
54 "Returns matrix T in the QZ decomposition. ",
55 bp::return_value_policy<bp::copy_const_reference>())
56 .def(
"matrixZ", &Solver::matrixZ, bp::arg(
"self"),
57 "Returns matrix Z in the QZ decomposition. ",
58 bp::return_value_policy<bp::copy_const_reference>())
60 .def(
"iterations", &Solver::iterations, bp::arg(
"self"),
61 "Returns number of performed QR-like iterations. ")
62 .def(
"setMaxIterations", &Solver::setMaxIterations,
63 bp::args(
"self",
"max_iter"),
64 "Sets the maximum number of iterations allowed.",
69 static const std::string classname =
70 "RealQZVisitor" + scalar_name<Scalar>::shortname();
74 static void expose(
const std::string& name) {
75 bp::class_<Solver>(name.c_str(), bp::no_init)
81 template <
typename MatrixType>
82 static Solver& compute_proxy(Solver& self,
const MatrixType& A,
83 const MatrixType& B) {
84 return self.compute(A, B);