19 :
public boost::python::def_visitor<
20 HessenbergDecompositionVisitor<_MatrixType>> {
21 typedef _MatrixType MatrixType;
22 typedef typename MatrixType::Scalar Scalar;
23 typedef Eigen::HessenbergDecomposition<MatrixType> Solver;
25 template <
class PyClass>
26 void visit(PyClass& cl)
const {
28 .def(bp::init<Eigen::DenseIndex>(
30 "Default constructor; the decomposition will be computed later. "))
31 .def(bp::init<MatrixType>(
33 "Constructor; computes Hessenberg decomposition of given matrix. "))
37 (Solver & (Solver::*)(
const Eigen::EigenBase<MatrixType>& matrix)) &
39 bp::args(
"self",
"A"),
40 "Computes Hessenberg decomposition of given matrix. ",
43 .def(
"householderCoefficients", &Solver::householderCoefficients,
44 bp::arg(
"self"),
"Returns the Householder coefficients. ",
45 bp::return_value_policy<bp::copy_const_reference>())
49 +[](
const Solver& c) -> MatrixType {
return c.matrixQ(); },
50 "Reconstructs the orthogonal matrix Q in the decomposition.")
53 +[](
const Solver& c) -> MatrixType {
return c.matrixH(); },
54 "Constructs the Hessenberg matrix H in the decomposition.")
56 .def(
"packedMatrix", &Solver::packedMatrix, bp::arg(
"self"),
57 "Returns the internal representation of the decomposition. ",
58 bp::return_value_policy<bp::copy_const_reference>());
62 static const std::string classname =
63 "HessenbergDecomposition" + scalar_name<Scalar>::shortname();
67 static void expose(
const std::string& name) {
68 bp::class_<Solver>(name.c_str(), bp::no_init)