2 cout <<
"Here is the matrix m:" << endl <<
m << endl;
3 JacobiSVD<MatrixXf, ComputeThinU | ComputeThinV>
svd(
m);
4 cout <<
"Its singular values are:" << endl <<
svd.singularValues() << endl;
5 cout <<
"Its left singular vectors are the columns of the thin U matrix:" << endl <<
svd.matrixU() << endl;
6 cout <<
"Its right singular vectors are the columns of the thin V matrix:" << endl <<
svd.matrixV() << endl;
8 cout <<
"Now consider this rhs vector:" << endl << rhs << endl;
9 cout <<
"A least-squares solution of m*x = rhs is:" << endl <<
svd.solve(rhs) << endl;
cout<< "Here is the matrix m:"<< endl<< m<< endl;JacobiSVD< MatrixXf, ComputeThinU|ComputeThinV > svd(m)
Matrix< float, 3, 1 > Vector3f
3×1 vector of type float.
Matrix< float, Dynamic, Dynamic > MatrixXf
Dynamic×Dynamic matrix of type float.