
Ublas : 
Subject: [ublas] Solving A*V = B*V*D with Lapack
From: Werner Grobler (werner.grobler_at_[hidden])
Date: 20120131 05:04:14
Hi,
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/boostnumericbindings
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