Subject: Re: CCL:Complex diagonalization

From: [email-masked] (Eberhard von Kitzing)
Date: Tue, 8 Apr 1997 13:28:31 +0100

At 11:38 Uhr 08.04.1997, Xose Manuel Valladares Pernas wrote:
>Hello to everybody
>We are looking for a efficient algorithm to make the diagonalization of a
>complex matrix. We would prefer forttran language. If you know any
>internet address please let we know. We will sumarize all the responses
>if there is interest on it.
>Thank you very much

Have a look at:
William H. Press, Saul A. Teukolsky,
William T. Vetterling and Brian P. Fannery (1992).
Numerical recipes in C. Cambridge, Cambridge University Press.

There is also a FORTRAN version of this book.

======================================================================

Eberhard von Kitzing

Max-Planck-Institut fuer Medizinische Forschung
Jahnstr. 29
D 69115 Heidelberg
Germanny

email: [email-masked]
WWW: http://sunny.mpimf-heidelberg.mpg.de/people/vkitzing/Eberhard.html

---

From: [email-masked] (Serge Pachkovsky)
Date: Tue, 8 Apr 1997 16:36:45 +0200 (MDT)

> There is also a FORTRAN version of this book.

Numerical Recipes is undoubtedly a nice book, which serves as very
nice introduction into the field. However, *programs* supplied with
this book are not always as robust and hands-off as one would hope.
Moreover, attaining best performance on widest possible range of
architectures and input sizes is very far from trivial, and certainly
goes beyond the scope of the book. Additionally, programs supplied 
with NR are bound by a rather nasty (IMHO) restrictions on their use 
and redistribution, which make them essentially useless unless your 
code is intended strictly for internal consumption (IMHO again - I am 
not a layer).

In this particular case (complex diagonalization), LAPACK is a much 
better (again IMHO) alternative, which is public domain, highly
efficient (and least for larger inputs), well tested (and comes with 
an extensive validation set) and extremely well documented. It may
be a little awkward to install if you'd never done it before, but
the chances are that a binary distribution for your particular platform
would be already available.

LAPACK is available at http://www.netlib.org/lapack
GAMS (NIST Guide to Available Mathematical Software), which may be
able to suggest other alternatives for you is available at http://gams.nist.gov/

Regards,

/Serge.P

P.S. Please do not consider this as an attack on Numerical Recipes - I had
enjoyed reading the book very much indeed!

---

From: Rick Venable <[email-masked]>
Date: Tue, 8 Apr 1997 15:52:17 -0400 (EDT)

> There is also a FORTRAN version of this book.

Have a look, but get your code from NETLIB (www.netlib.org) if performance
or rights to the code are issues.  Note that NR code is *copyrighted*
(NETLIB is public domain) and you are obligated to buy the book if you use
any of the code. Redistribution of NR code also requires royalty payments
to the authors.

I replaced Numerical Recipes routines with their NETLIB equivalents
(matrix diag, matrix inv, etc.) and observed a ca. 50-fold performance
increase.  Part of this was due to the easy integration of the workstation
vendor's BLAS library into the NETLIB code, of course.

The NR book is good and provides many valuable explanations, but the code
has "strings" attached, and isn't the best available.  Also, be sure to
get the second edition; there are a few bugs in the code published in the
first edition.

--
Rick Venable                  =====\     |=|    "Eschew Obfuscation"
FDA/CBER Biophysics Lab       |____/     |=|
Bethesda, MD  U.S.A.          |   \    / |=|  ( Not an official statement or
[email-masked]  |    \  /  |=|    position of the FDA; for that,
http://nmr1.cber.nih.gov/           \/   |=|    see   http://www.fda.gov  )