source: pacpussensors/trunk/Vislab/lib3dv-1.2.0/lib3dv/eigen/doc/snippets/Tridiagonalization_decomposeInPlace.cpp

Last change on this file was 136, checked in by ldecherf, 8 years ago

Doc

File size: 475 bytes
Line 
1MatrixXd X = MatrixXd::Random(5,5);
2MatrixXd A = X + X.transpose();
3cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl;
4
5VectorXd diag(5);
6VectorXd subdiag(4);
7internal::tridiagonalization_inplace(A, diag, subdiag, true);
8cout << "The orthogonal matrix Q is:" << endl << A << endl;
9cout << "The diagonal of the tridiagonal matrix T is:" << endl << diag << endl;
10cout << "The subdiagonal of the tridiagonal matrix T is:" << endl << subdiag << endl;
Note: See TracBrowser for help on using the repository browser.