Tridiagonalization_diagonal.cpp
Go to the documentation of this file.
1 MatrixXcd X = MatrixXcd::Random(4,4);
2 MatrixXcd A = X + X.adjoint();
3 cout << "Here is a random self-adjoint 4x4 matrix:" << endl << A << endl << endl;
4 
5 Tridiagonalization<MatrixXcd> triOfA(A);
6 MatrixXd T = triOfA.matrixT();
7 cout << "The tridiagonal matrix T is:" << endl << T << endl << endl;
8 
9 cout << "We can also extract the diagonals of T directly ..." << endl;
10 VectorXd diag = triOfA.diagonal();
11 cout << "The diagonal is:" << endl << diag << endl;
12 VectorXd subdiag = triOfA.subDiagonal();
13 cout << "The subdiagonal is:" << endl << subdiag << endl;
gtsam::diag
Matrix diag(const std::vector< Matrix > &Hs)
Definition: Matrix.cpp:206
X
MatrixXcd X
Definition: Tridiagonalization_diagonal.cpp:1
A
Definition: test_numpy_dtypes.cpp:298
triOfA
cout<< "Here is a random self-adjoint 4x4 matrix:"<< endl<< A<< endl<< endl;Tridiagonalization< MatrixXcd > triOfA(A)
Eigen::Triplet
A small structure to hold a non zero as a triplet (i,j,value).
Definition: SparseUtil.h:162


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:36