3 cout <<
"Here is a random symmetric matrix, A:" << endl <<
A << endl;
4 X = MatrixXd::Random(5,5);
6 cout <<
"and a random positive-definite matrix, B:" << endl <<
B << endl << endl;
8 GeneralizedSelfAdjointEigenSolver<MatrixXd>
es(
A,
B);
9 cout <<
"The eigenvalues of the pencil (A,B) are:" << endl <<
es.eigenvalues() << endl;
10 cout <<
"The matrix of eigenvectors, V, is:" << endl <<
es.eigenvectors() << endl << endl;
13 cout <<
"Consider the first eigenvalue, lambda = " <<
lambda << endl;
15 cout <<
"If v is the corresponding eigenvector, then A * v = " << endl <<
A *
v << endl;
16 cout <<
"... and lambda * B * v = " << endl <<
lambda *
B *
v << endl << endl;
Array< int, Dynamic, 1 > v
cout<< "The eigenvalues of A are:"<< endl<< ces.eigenvalues()<< endl;cout<< "The matrix of eigenvectors, V, is:"<< endl<< ces.eigenvectors()<< endl<< endl;complex< float > lambda
cout<< "Here is a random symmetric matrix, A:"<< endl<< A<< endl;X=MatrixXd::Random(5, 5);MatrixXd B=X *X.transpose();cout<< "and a random positive-definite matrix, B:"<< endl<< B<< endl<< endl;GeneralizedSelfAdjointEigenSolver< MatrixXd > es(A, B)
Matrix< double, Dynamic, 1 > VectorXd
DynamicĂ—1 vector of type double.
Matrix< double, Dynamic, Dynamic > MatrixXd
DynamicĂ—Dynamic matrix of type double.