libeigen/eigen!2509 Closes #2868 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
12 lines
474 B
C++
12 lines
474 B
C++
// SPDX-FileCopyrightText: The Eigen Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
Matrix4f A = MatrixXf::Random(4, 4);
|
|
cout << "Here is a random 4x4 matrix:" << endl << A << endl;
|
|
HessenbergDecomposition<MatrixXf> hessOfA(A);
|
|
MatrixXf H = hessOfA.matrixH();
|
|
cout << "The Hessenberg matrix H is:" << endl << H << endl;
|
|
MatrixXf Q = hessOfA.matrixQ();
|
|
cout << "The orthogonal matrix Q is:" << endl << Q << endl;
|
|
cout << "Q H Q^T is:" << endl << Q * H * Q.transpose() << endl;
|