22 :
public boost::python::def_visitor<LanczosDecompositionPythonVisitor<LanczosDecomposition>>
24 typedef LanczosDecomposition Self;
25 typedef typename LanczosDecomposition::Scalar Scalar;
26 typedef typename LanczosDecomposition::TridiagonalMatrix TridiagonalMatrix;
27 typedef typename LanczosDecomposition::PlainMatrix PlainMatrix;
30 template<
class PyClass>
31 void visit(PyClass & cl)
const 36 bp::init<const context::MatrixXs &, const Eigen::Index>(
37 (bp::arg(
"self"), bp::arg(
"matrix"), bp::arg(
"decomposition_size")),
38 "Default constructor from a given matrix and a given decomposition size."))
41 bp::init<const Eigen::Index, const Eigen::Index>(
42 (bp::arg(
"self"), bp::arg(
"size"), bp::arg(
"decomposition_size")),
43 "Default constructor for the Lanczos decomposition from a given matrix size."))
46 "compute", &LanczosDecomposition::template compute<context::MatrixXs>,
47 bp::args(
"self",
"matrix"),
48 "Computes the Lanczos decomposition for the given input matrix.")
51 "Ts", (TridiagonalMatrix & (LanczosDecomposition::*)()) & LanczosDecomposition::Ts,
53 "Returns the tridiagonal matrix associated with the Lanczos decomposition.",
54 bp::return_internal_reference<>())
56 "Qs", (PlainMatrix & (LanczosDecomposition::*)()) & LanczosDecomposition::Qs,
58 "Returns the orthogonal basis associated with the Lanczos decomposition.",
59 bp::return_internal_reference<>())
62 "computeDecompositionResidual",
63 &LanczosDecomposition::template computeDecompositionResidual<context::MatrixXs>,
64 bp::args(
"self",
"matrix"),
65 "Computes the residual associated with the decomposition, namely, the quantity \f$ A " 69 "size", &LanczosDecomposition::size, bp::arg(
"self"),
70 "Returns the size of the underlying matrix.")
72 "decompositionSize", &LanczosDecomposition::decompositionSize, bp::arg(
"self"),
73 "Returns the size of the decomposition.")
75#ifndef PINOCCHIO_PYTHON_SKIP_COMPARISON_OPERATIONS 76 .def(bp::self == bp::self)
77 .def(bp::self != bp::self)
80 .def(::eigenpy::CopyableVisitor<Self>())
87 typedef ::boost::python::detail::not_specified HolderType;
88 bp::class_<LanczosDecomposition, HolderType>(
89 "LanczosDecomposition",
"Lanczos decomposition.", bp::no_init)