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:
15
third_party/eigen/doc/snippets/Tridiagonalization_diagonal.cpp
vendored
Normal file
15
third_party/eigen/doc/snippets/Tridiagonalization_diagonal.cpp
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
MatrixXcd X = MatrixXcd::Random(4, 4);
|
||||
MatrixXcd A = X + X.adjoint();
|
||||
cout << "Here is a random self-adjoint 4x4 matrix:" << endl
|
||||
<< A << endl
|
||||
<< endl;
|
||||
|
||||
Tridiagonalization<MatrixXcd> triOfA(A);
|
||||
MatrixXd T = triOfA.matrixT();
|
||||
cout << "The tridiagonal matrix T is:" << endl << T << endl << endl;
|
||||
|
||||
cout << "We can also extract the diagonals of T directly ..." << endl;
|
||||
VectorXd diag = triOfA.diagonal();
|
||||
cout << "The diagonal is:" << endl << diag << endl;
|
||||
VectorXd subdiag = triOfA.subDiagonal();
|
||||
cout << "The subdiagonal is:" << endl << subdiag << endl;
|
Reference in New Issue
Block a user