unsymmetric eigenvalue problem

Patrick.Alken@colorado.edu Patrick.Alken@colorado.edu
Wed May 17 20:45:00 GMT 2006


Hello all,

  I have recently needed to compute eigenvalues of unsymmetric
matrices, and so I wrote a code based in GSL to do it since
one does not currently exist. I followed the QR algorithm
outlined in Golub & Van Loan, chapter 7.

  I have attached a patch file to this email containing all
my code. Right now only the eigenvalue problem is solved,
the code will not compute eigenvectors. The patch is against
gsl-1.8 so just cd into a fresh gsl-1.8 and

patch -p0 < gsl.unsymm.patch

You will probably need to run automake again in the toplevel
dir to update the Makefile.am's. I have also attached a
test program eig.c to illustrate the use of the solver.

The patch creates 3 new source files:

linalg/hessenberg.c
eigen/balance.c
eigen/unsymm.c

and 1 header file
eigen/balance.h

hessenberg.c contains gsl_linalg_hessenberg() which reduces
a matrix to upper Hessenberg form.

balance.c contains balance_matrix() to do the standard matrix
balancing before finding eigenvalues.

unsymm.c contains the Francis QR algorithm to find the eigenvalues
of a general unsymmetric real matrix:
  gsl_eigen_unsymm_alloc()
  gsl_eigen_unsymm_free()
  gsl_eigen_unsymm() --- Solves A x = \lambda x

I am happy to contribute this to GSL if the developers want to
use it. Also, if there is interest, I would be willing to look
at coding up an eigenvector solver too for the unsymmetric
eigenvalue program - I only needed eigenvalues for my current
project so I haven't looked at the eigenvector problem.

Also if there is interest I'd be interested in looking at the
generalized eigenvalue problem since I feel GSL is incomplete
without an Ax = sBx solver.

Please test and give feedback.

Thanks,
Patrick Alken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eig.c
Type: text/x-csrc
Size: 1795 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20060517/4c8ddf3f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gsl.unsymm.patch
Type: text/x-patch
Size: 37650 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20060517/4c8ddf3f/attachment-0001.bin>


More information about the Gsl-discuss mailing list