@@ -18,7 +18,6 @@ namespace eigenpy {
1818template <typename _MatrixType>
1919struct JacobiSVDVisitor
2020 : public boost::python::def_visitor<JacobiSVDVisitor<_MatrixType>> {
21-
2221 typedef _MatrixType MatrixType;
2322 typedef Eigen::JacobiSVD<MatrixType> Solver;
2423 typedef typename MatrixType::Scalar Scalar;
@@ -32,34 +31,39 @@ struct JacobiSVDVisitor
3231 .def (bp::init<Eigen::DenseIndex, Eigen::DenseIndex, unsigned int >(
3332 bp::args (" self" , " rows" , " cols" , " computationOptions " ),
3433 " Default Constructor with memory preallocation. \n\n "
35- " Like the default constructor but with preallocation of the internal "
36- " data according to the specified problem size and the computationOptions. " ))
34+ " Like the default constructor but with preallocation of the "
35+ " internal "
36+ " data according to the specified problem size and the "
37+ " computationOptions. " ))
3738 .def (bp::init<MatrixType>(
3839 bp::args (" self" , " matrix" ),
3940 " Constructor performing the decomposition of given matrix. " ))
4041 .def (bp::init<MatrixType, unsigned int >(
4142 bp::args (" self" , " matrix" , " computationOptions " ),
4243 " Constructor performing the decomposition of given matrix. \n\n "
43- " One cannot request unitiaries using both the Options template parameter "
44- " and the constructor. If possible, prefer using the Options template parameter." ))
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." ))
4548
4649 .def (" cols" , &Solver::cols, bp::arg (" self" ),
4750 " Returns the number of columns. " )
48- .def (
49- " compute" ,
50- (Solver & (Solver::*)(const MatrixType &matrix)) &
51- Solver::compute,
52- bp::args (" self" , " matrix" ),
53- " Method performing the decomposition of given matrix. Computes Thin/Full "
54- " unitaries U/V if specified using the Options template parameter or the class constructor. " ,
55- bp::return_self<>())
56- .def (
57- " compute" ,
58- (Solver & (Solver::*)(const MatrixType &matrix, unsigned int computationOptions)) &
59- Solver::compute,
60- bp::args (" self" , " matrix" ),
61- " Method performing the decomposition of given matrix, as specified by the computationOptions parameter. " ,
62- bp::return_self<>())
51+ .def (" compute" ,
52+ (Solver & (Solver::*)(const MatrixType &matrix)) & Solver::compute,
53+ bp::args (" self" , " matrix" ),
54+ " Method performing the decomposition of given matrix. Computes "
55+ " Thin/Full "
56+ " unitaries U/V if specified using the Options template parameter "
57+ " or the class constructor. " ,
58+ bp::return_self<>())
59+ .def (" compute" ,
60+ (Solver & (Solver::*)(const MatrixType &matrix,
61+ unsigned int computationOptions)) &
62+ Solver::compute,
63+ bp::args (" self" , " matrix" ),
64+ " Method performing the decomposition of given matrix, as "
65+ " specified by the computationOptions parameter. " ,
66+ bp::return_self<>())
6367 .def (" rows" , &Solver::rows, bp::arg (" self" ),
6468 " Returns the number of rows. . " )
6569
@@ -76,20 +80,32 @@ struct JacobiSVDVisitor
7680 bp::class_<Solver, boost::noncopyable>(
7781 name.c_str (),
7882 " Two-sided Jacobi SVD decomposition of a rectangular matrix. \n\n "
79- " SVD decomposition consists in decomposing any n-by-p matrix A as a product "
80- " A=USV∗ where U is a n-by-n unitary, V is a p-by-p unitary, and S is a n-by-p r"
81- " eal positive matrix which is zero outside of its main diagonal; the diagonal "
82- " entries of S are known as the singular values of A and the columns of U and V "
83- " are known as the left and right singular vectors of A respectively. \n\n "
83+ " SVD decomposition consists in decomposing any n-by-p matrix A as a "
84+ " product "
85+ " A=USV∗ where U is a n-by-n unitary, V is a p-by-p unitary, and S is a "
86+ " n-by-p r"
87+ " eal positive matrix which is zero outside of its main diagonal; the "
88+ " diagonal "
89+ " entries of S are known as the singular values of A and the columns of "
90+ " U and V "
91+ " are known as the left and right singular vectors of A respectively. "
92+ " \n\n "
8493 " Singular values are always sorted in decreasing order. \n\n "
85- " This JacobiSVD decomposition computes only the singular values by default. "
94+ " This JacobiSVD decomposition computes only the singular values by "
95+ " default. "
8696 " If you want U or V, you need to ask for them explicitly. \n\n "
87- " You can ask for only thin U or V to be computed, meaning the following. "
88- " In case of a rectangular n-by-p matrix, letting m be the smaller value among "
89- " n and p, there are only m singular vectors; the remaining columns of U and V "
90- " do not correspond to actual singular vectors. Asking for thin U or V means asking "
91- " for only their m first columns to be formed. So U is then a n-by-m matrix, and V "
92- " is then a p-by-m matrix. Notice that thin U and V are all you need for (least squares) "
97+ " You can ask for only thin U or V to be computed, meaning the "
98+ " following. "
99+ " In case of a rectangular n-by-p matrix, letting m be the smaller "
100+ " value among "
101+ " n and p, there are only m singular vectors; the remaining columns of "
102+ " U and V "
103+ " do not correspond to actual singular vectors. Asking for thin U or V "
104+ " means asking "
105+ " for only their m first columns to be formed. So U is then a n-by-m "
106+ " matrix, and V "
107+ " is then a p-by-m matrix. Notice that thin U and V are all you need "
108+ " for (least squares) "
93109 " solving." ,
94110 bp::no_init)
95111 .def (JacobiSVDVisitor ())
0 commit comments