00001 SelfAdjointEigenSolver<Matrix4f> es; 00002 Matrix4f X = Matrix4f::Random(4,4); 00003 Matrix4f A = X + X.transpose(); 00004 es.compute(A); 00005 cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; 00006 es.compute(A + Matrix4f::Identity(4,4)); // re-use es to compute eigenvalues of A+I 00007 cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;