@@ -10,56 +10,6 @@ namespace nanoeigenpy {
1010namespace nb = nanobind;
1111using namespace nb ::literals;
1212
13- // template<typename SparseQRType>
14- // class SparseQRMatrixQReturnTypeWrapper {
15- // private:
16- // Eigen::SparseQRMatrixQReturnType<SparseQRType> m_q_expr;
17-
18- // public:
19- // explicit SparseQRMatrixQReturnTypeWrapper(const SparseQRType& qr)
20- // : m_q_expr(qr) {}
21-
22- // Eigen::Index rows() const { return m_q_expr.rows(); }
23- // Eigen::Index cols() const { return m_q_expr.cols(); }
24-
25- // Eigen::VectorXd multiply_vec(const Eigen::VectorXd& vec) {
26- // return Eigen::VectorXd(m_q_expr * vec);
27- // }
28-
29- // Eigen::MatrixXd multiply_mat(const Eigen::MatrixXd& mat) {
30- // return Eigen::MatrixXd(m_q_expr * mat);
31- // }
32-
33- // auto adjoint() const {
34- // return
35- // SparseQRMatrixQTransposeReturnTypeWrapper<SparseQRType>(m_q_expr);
36- // }
37-
38- // auto transpose() const {
39- // return
40- // SparseQRMatrixQTransposeReturnTypeWrapper<SparseQRType>(m_q_expr);
41- // }
42- // };
43-
44- // template<typename SparseQRType>
45- // class SparseQRMatrixQTransposeReturnTypeWrapper {
46- // private:
47- // Eigen::SparseQRMatrixQTransposeReturnType<SparseQRType> m_qt_expr;
48-
49- // public:
50- // explicit SparseQRMatrixQTransposeReturnTypeWrapper(const SparseQRType&
51- // qt)
52- // : m_qt_expr(qt) {}
53-
54- // Eigen::VectorXd multiply_vec(const Eigen::VectorXd& vec) {
55- // return Eigen::VectorXd(m_qt_expr * vec);
56- // }
57-
58- // Eigen::MatrixXd multiply_mat(const Eigen::MatrixXd& mat) {
59- // return Eigen::MatrixXd(m_qt_expr * mat);
60- // }
61- // };
62-
6313template <typename _MatrixType, typename _Ordering = Eigen::COLAMDOrdering<
6414 typename _MatrixType::StorageIndex>>
6515void exposeSparseQR (nb::module_ m, const char *name) {
@@ -70,37 +20,11 @@ void exposeSparseQR(nb::module_ m, const char *name) {
7020 using RealScalar = typename MatrixType::RealScalar;
7121 using QRMatrixType = Eigen::SparseMatrix<Scalar, Eigen::ColMajor,
7222 typename MatrixType::StorageIndex>;
73- // using QWrapper = SparseQRMatrixQReturnTypeWrapper<Solver>;
74- // using QTWrapper = SparseQRMatrixQTransposeReturnTypeWrapper<Solver>;
7523
7624 if (check_registration_alias<Solver>(m)) {
7725 return ;
7826 }
7927
80- // nb::class_<QWrapper>(m, "SparseQRMatrixQ")
81- // .def("rows", &QWrapper::rows)
82- // .def("cols", &QWrapper::cols)
83- // .def("__mul__", [](const QWrapper& self, const Eigen::Ref<const
84- // Eigen::VectorXd>& vec) {
85- // return self.multiply_vec(vec);
86- // }, "vec"_a)
87- // .def("__mul__", [](const QWrapper& self, const Eigen::Ref<const
88- // Eigen::MatrixXd>& mat) {
89- // return self.multiply_mat(mat);
90- // }, "mat"_a)
91- // .def("adjoint", &QWrapper::adjoint)
92- // .def("transpose", &QWrapper::transpose);
93-
94- // nb::class_<QTWrapper>(m, "SparseQRMatrixQTranspose")
95- // .def("__mul__", [](const QTWrapper& self, const Eigen::Ref<const
96- // Eigen::VectorXd>& vec) {
97- // return self.multiply_vec(vec);
98- // }, "vec"_a)
99- // .def("__mul__", [](const QTWrapper& self, const Eigen::Ref<const
100- // Eigen::MatrixXd>& mat) {
101- // return self.multiply_mat(mat);
102- // }, "mat"_a);
103-
10428 nb::class_<Solver>(
10529 m, name,
10630 " Sparse left-looking QR factorization with numerical column pivoting. "
@@ -147,10 +71,6 @@ void exposeSparseQR(nb::module_ m, const char *name) {
14771 " The input matrix should be in compressed mode "
14872 " (see SparseMatrix::makeCompressed())." )
14973
150- // .def("matrixQ", [](const Solver& self) -> QWrapper {
151- // return QWrapper(self);
152- // }, "Returns an expression of the matrix Q")
153-
15474 .def (
15575 " matrixR" ,
15676 [](Solver &self) -> const QRMatrixType & { return self.matrixR (); },
0 commit comments