2 cout <<
"Here is a random 6x6 matrix, A:" << endl <<
A << endl << endl;
4 EigenSolver<MatrixXd>
es(
A);
5 cout <<
"The eigenvalues of A are:" << endl <<
es.eigenvalues() << endl;
6 cout <<
"The matrix of eigenvectors, V, is:" << endl <<
es.eigenvectors() << endl << endl;
8 complex<double>
lambda =
es.eigenvalues()[0];
9 cout <<
"Consider the first eigenvalue, lambda = " <<
lambda << endl;
11 cout <<
"If v is the corresponding eigenvector, then lambda * v = " << endl <<
lambda *
v << endl;
12 cout <<
"... and A * v = " << endl <<
A.cast<complex<double> >() *
v << endl << endl;
16 cout <<
"Finally, V * D * V^(-1) = " << endl <<
V *
D *
V.inverse() << endl;
Array< int, Dynamic, 1 > v
cout<< "The eigenvalues of A are:"<< endl<< es.eigenvalues()<< endl;cout<< "The matrix of eigenvectors, V, is:"<< endl<< es.eigenvectors()<< endl<< endl;complex< double > lambda
cout<< "Here is a random 6x6 matrix, A:"<< endl<< A<< endl<< endl;EigenSolver< MatrixXd > es(A)
Matrix< std::complex< double >, Dynamic, 1 > VectorXcd
Dynamic×1 vector of type std::complex<double>.
Matrix< double, Dynamic, Dynamic > MatrixXd
Dynamic×Dynamic matrix of type double.
Matrix< std::complex< double >, Dynamic, Dynamic > MatrixXcd
Dynamic×Dynamic matrix of type std::complex<double>.