Registered Member
|
Hollo,
I wrote the C++ code with eigen to solve a Av = lBv problem, here
-0.448951 -0.289696 -0.445526 -0.319255 -0.48359 -0.445526 -0.0291673 -0.448951 -0.445526 -0.319255 -0.448951 -0.289696 B= 0.999977 0.658283 0.491743 0.523003 0.658283 1 0.523003 0.868399 0.491743 0.523003 0.999977 0.658283 0.523003 0.868399 0.658283 1 Obtained eigenvalues "l" is almost the same with the eigenvalues obtained by using lapack dsygv. However, obtained eigenvector is different from these of lapack dsygv. The results from GeneralizedSelfAdjointEigenSolver:
0.203801 0.687355 1.35542 v = -0.321235 0.156434 0.753708 -1.15322 -0.272789 1.7707 -0.679355 1.44747 -0.321235 -0.156434 0.753708 1.15322 -0.272789 -1.7707 -0.679355 -1.44747 The result from lapack dsygv:
0.2038101470 0.6873309840 1.3553507406 v= 0.3212362790 0.3212362790 0.3212362790 0.3212362790 0.1564368400 0.1564368400 0.1564368400 0.1564368400 -0.7536975044 -0.7536975044 -0.7536975044 -0.7536975044 1.1532122077 1.1532122077 1.1532122077 1.1532122077 Do anyone knows why I got the eigenvector different from the results of lapack and how method to get the same eigenvector of lapack dsygv? |
Moderator
|
The ones returned by lapack do not looks right as they do not satisfy v' * B * v = 1, nor Av = lBv, and they are not orthogonal.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]