Skip to content

Commit 0f1b08b

Browse files
Lucas-Haubertjcarpent
authored andcommitted
decompositions: Rewrite comments in constructors in BDCSVD
1 parent f3cd6f5 commit 0f1b08b

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

include/eigenpy/decompositions/BDCSVD.hpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,22 @@ struct BDCSVDVisitor
2929
bp::args("self", "rows", "cols"),
3030
"Default Constructor with memory preallocation. "))
3131
.def(bp::init<Eigen::DenseIndex, Eigen::DenseIndex, unsigned int>(
32-
bp::args("self", "rows", "cols", "computationOptions"),
33-
"Default Constructor with memory preallocation. "))
32+
bp::args("self", "rows", "cols", "computationOptions "),
33+
"Default Constructor with memory preallocation. \n\n"
34+
"Like the default constructor but with preallocation of the "
35+
"internal "
36+
"data according to the specified problem size and the "
37+
"computationOptions. "))
3438
.def(bp::init<MatrixType>(
3539
bp::args("self", "matrix"),
3640
"Constructor performing the decomposition of given matrix. "))
3741
.def(bp::init<MatrixType, unsigned int>(
38-
bp::args("self", "matrix", "computationOptions"),
39-
"Constructor performing the decomposition of given matrix. "))
42+
bp::args("self", "matrix", "computationOptions "),
43+
"Constructor performing the decomposition of given matrix. \n\n"
44+
"One cannot request unitiaries using both the Options template "
45+
"parameter "
46+
"and the constructor. If possible, prefer using the Options "
47+
"template parameter."))
4048

4149
.def("cols", &Solver::cols, bp::arg("self"),
4250
"Returns the number of columns. ")
@@ -52,7 +60,7 @@ struct BDCSVDVisitor
5260
(Solver & (Solver::*)(const MatrixType &matrix,
5361
unsigned int computationOptions)) &
5462
Solver::compute,
55-
bp::args("self", "matrix"),
63+
bp::args("self", "matrix", "computationOptions"),
5664
"Method performing the decomposition of given matrix, as "
5765
"specified by the computationOptions parameter. ",
5866
bp::return_self<>())

include/eigenpy/decompositions/JacobiSVD.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ struct JacobiSVDVisitor
2525
template <class PyClass>
2626
void visit(PyClass &cl) const {
2727
cl.def(bp::init<>(bp::arg("self"), "Default constructor"))
28-
// TODO: Management of _Options, put default options for default
29-
// constructor
3028
.def(bp::init<Eigen::DenseIndex, Eigen::DenseIndex>(
3129
bp::args("self", "rows", "cols"),
3230
"Default Constructor with memory preallocation. "))
@@ -62,7 +60,7 @@ struct JacobiSVDVisitor
6260
(Solver & (Solver::*)(const MatrixType &matrix,
6361
unsigned int computationOptions)) &
6462
Solver::compute,
65-
bp::args("self", "matrix"),
63+
bp::args("self", "matrix", "computationOptions"),
6664
"Method performing the decomposition of given matrix, as "
6765
"specified by the computationOptions parameter. ",
6866
bp::return_self<>())

0 commit comments

Comments
 (0)