Update SVD Module to allow specifying computation options with a template parameter. Resolves #2051

This commit is contained in:
Arthur
2021-11-29 20:50:46 +00:00
committed by Rasmus Munk Larsen
parent 4a76880351
commit eef33946b7
23 changed files with 766 additions and 636 deletions

View File

@@ -1,6 +1,6 @@
MatrixXf m = MatrixXf::Random(3,2);
cout << "Here is the matrix m:" << endl << m << endl;
JacobiSVD<MatrixXf> svd(m, ComputeThinU | ComputeThinV);
JacobiSVD<MatrixXf, ComputeThinU | ComputeThinV> svd(m);
cout << "Its singular values are:" << endl << svd.singularValues() << endl;
cout << "Its left singular vectors are the columns of the thin U matrix:" << endl << svd.matrixU() << endl;
cout << "Its right singular vectors are the columns of the thin V matrix:" << endl << svd.matrixV() << endl;