blob: 93dcfca1d6de1bf0e06419c7575a94d7c329fbfa [file] [log] [blame]
Jitse Niesenafed0ef2010-05-01 17:52:16 +01001MatrixXd 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);
Benoit Jacob47160402010-10-25 10:15:22 -04007internal::tridiagonalization_inplace(A, diag, subdiag, true);
Jitse Niesenafed0ef2010-05-01 17:52:16 +01008cout << "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;