Change return type of matrixH() method to HouseholderSequence.

This method is a member of Tridiagonalization and HessenbergDecomposition.
This commit is contained in:
Jitse Niesen
2010-05-24 17:35:54 +01:00
parent 76dd0e5314
commit eb3ca68684
5 changed files with 92 additions and 81 deletions

View File

@@ -1,11 +1,9 @@
MatrixXd X = MatrixXd::Random(5,5);
MatrixXd A = X + X.transpose();
cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl;
Tridiagonalization<MatrixXd> triOfA(A);
cout << "The orthogonal matrix Q is:" << endl << triOfA.matrixQ() << endl;
cout << "The tridiagonal matrix T is:" << endl << triOfA.matrixT() << endl << endl;
MatrixXd Q = triOfA.matrixQ();
cout << "The orthogonal matrix Q is:" << endl << Q << endl;
MatrixXd T = triOfA.matrixT();
cout << "The tridiagonal matrix T is:" << endl << T << endl << endl;
cout << "Q * T * Q^T = " << endl << Q * T * Q.transpose() << endl;