Subject: Re: [ublas] Solving A*V = B*V*D with Lapack
From: Werner Grobler (werner.grobler_at_[hidden])
Date: 2012-01-31 05:24:15
I'm trying to implement the following MATLAB function with boost ublas lapack bindings:
[V,D] = EIG(A,B)
Produces a diagonal matrix D of generalized eigenvalues, and a full matrix V whose columns are the corresponding eigenvectors so that A*V = B*V*D.
I'm using the bindings from Andreas Klöckner (http://mathema.tician.de/dl/software/boost-numeric-bindings).
Initially I used lapack::hegv (wraps ssygv for single precision) which works fine for real symmetric A, and symmetric positive definite B. The problem is that my B matrix is general (symmetric and not positive definite) so this approach failed.
Next I tried sggev, for which I didn't have a lapack binding so I hacked my own. This didn't give me the results I was expecting.
I have two questions:
1. Is there another lapack function, or functions, to solve this problem other than ggev or hegv?
2. If ggev is the correct function to apply, where can I obtain the correct binding? The bindings under sourceforge don't seem to include ggev (or even hegv).
Thanks in advance