mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 17:17:14 +08:00
Move eigen to third party (#282)
* remove useless statement * Add eigen to third_party dir * remove reducdant lines
This commit is contained in:
14
third_party/eigen/doc/snippets/JacobiSVD_basic.cpp
vendored
Normal file
14
third_party/eigen/doc/snippets/JacobiSVD_basic.cpp
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
MatrixXf m = MatrixXf::Random(3, 2);
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
JacobiSVD<MatrixXf> svd(m, ComputeThinU | ComputeThinV);
|
||||
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;
|
||||
Vector3f rhs(1, 0, 0);
|
||||
cout << "Now consider this rhs vector:" << endl << rhs << endl;
|
||||
cout << "A least-squares solution of m*x = rhs is:" << endl
|
||||
<< svd.solve(rhs) << endl;
|
Reference in New Issue
Block a user