19 TridiagonalizationVisitor<_MatrixType>> {
20 typedef _MatrixType MatrixType;
21 typedef typename MatrixType::Scalar Scalar;
22 typedef Eigen::Tridiagonalization<MatrixType> Solver;
23 typedef Eigen::VectorXd VectorType;
25 template <
class PyClass>
26 void visit(PyClass &cl)
const {
28 bp::init<Eigen::DenseIndex>(bp::arg(
"size"),
"Default constructor. "))
29 .def(bp::init<MatrixType>(bp::arg(
"matrix"),
30 "Constructor; computes tridiagonal " 31 "decomposition of given matrix. "))
35 (Solver & (Solver::*)(
const Eigen::EigenBase<MatrixType> &matrix)) &
37 bp::args(
"self",
"matrix"),
38 "Computes tridiagonal decomposition of given matrix. ",
41 .def(
"householderCoefficients", &Solver::householderCoefficients,
42 bp::arg(
"self"),
"Returns the Householder coefficients. ")
43 .def(
"packedMatrix", &Solver::packedMatrix, bp::arg(
"self"),
44 "Returns the internal representation of the decomposition. ",
45 bp::return_value_policy<bp::copy_const_reference>())
49 +[](
const Solver &c) -> MatrixType {
return c.matrixQ(); },
50 "Returns the unitary matrix Q in the decomposition.")
53 +[](
const Solver &c) -> MatrixType {
return c.matrixT(); },
54 "Returns an expression of the tridiagonal matrix T in the " 59 +[](
const Solver &c) -> VectorType {
return c.diagonal(); },
61 "Returns the diagonal of the tridiagonal matrix T in the " 66 +[](
const Solver &c) -> VectorType {
return c.subDiagonal(); },
68 "Returns the subdiagonal of the tridiagonal matrix T in the " 73 static const std::string classname =
74 "TridiagonalizationVisitor" + scalar_name<Scalar>::shortname();
78 static void expose(
const std::string &name) {
79 bp::class_<Solver>(name.c_str(), bp::no_init)