mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Update code snippet for tridiagonalize_inplace.
This commit is contained in:
parent
8ce341caf2
commit
fb1718ad14
@ -4,7 +4,8 @@ cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl;
|
|||||||
|
|
||||||
VectorXd diag(5);
|
VectorXd diag(5);
|
||||||
VectorXd subdiag(4);
|
VectorXd subdiag(4);
|
||||||
internal::tridiagonalization_inplace(A, diag, subdiag, true);
|
VectorXd hcoeffs(4); // Scratch space for householder reflector.
|
||||||
|
internal::tridiagonalization_inplace(A, diag, subdiag, hcoeffs, true);
|
||||||
cout << "The orthogonal matrix Q is:" << endl << A << endl;
|
cout << "The orthogonal matrix Q is:" << endl << A << endl;
|
||||||
cout << "The diagonal of the tridiagonal matrix T is:" << endl << diag << endl;
|
cout << "The diagonal of the tridiagonal matrix T is:" << endl << diag << endl;
|
||||||
cout << "The subdiagonal of the tridiagonal matrix T is:" << endl << subdiag << endl;
|
cout << "The subdiagonal of the tridiagonal matrix T is:" << endl << subdiag << endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user