xref: /aosp_15_r20/external/eigen/doc/snippets/Tridiagonalization_householderCoefficients.cpp (revision bf2c37156dfe67e5dfebd6d394bad8b2ab5804d4)
1*bf2c3715SXin Li Matrix4d X = Matrix4d::Random(4,4);
2*bf2c3715SXin Li Matrix4d A = X + X.transpose();
3*bf2c3715SXin Li cout << "Here is a random symmetric 4x4 matrix:" << endl << A << endl;
4*bf2c3715SXin Li Tridiagonalization<Matrix4d> triOfA(A);
5*bf2c3715SXin Li Vector3d hc = triOfA.householderCoefficients();
6*bf2c3715SXin Li cout << "The vector of Householder coefficients is:" << endl << hc << endl;
7