Tridiagonalization_decomposeInPlace.cpp
Go to the documentation of this file.
1 MatrixXd X = MatrixXd::Random(5,5);
2 MatrixXd A = X + X.transpose();
3 cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl;
4 
5 VectorXd diag(5);
6 VectorXd subdiag(4);
7 VectorXd hcoeffs(4); // Scratch space for householder reflector.
8 internal::tridiagonalization_inplace(A, diag, subdiag, hcoeffs, true);
9 cout << "The orthogonal matrix Q is:" << endl << A << endl;
10 cout << "The diagonal of the tridiagonal matrix T is:" << endl << diag << endl;
11 cout << "The subdiagonal of the tridiagonal matrix T is:" << endl << subdiag << endl;
X
MatrixXd X
Definition: Tridiagonalization_decomposeInPlace.cpp:1
gtsam::diag
Matrix diag(const std::vector< Matrix > &Hs)
Definition: Matrix.cpp:206
A
Definition: test_numpy_dtypes.cpp:298
Eigen::internal::tridiagonalization_inplace
EIGEN_DEVICE_FUNC void tridiagonalization_inplace(MatrixType &matA, CoeffVectorType &hCoeffs)
Definition: Tridiagonalization.h:349


gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:11:26