On Mon, Aug 11, 2008 at 5:08 AM, Tamas K Papp tpapp@princeton.edu wrote:
On Sun, Aug 10, 2008 at 06:38:16PM -0400, Liam Healy wrote:
Tamas,
I added this function to the future (ffa) version of GSLL, and it works. This is my attempt at a backport to the current version:
(defmfun matrix-exponential (matrix exponential) "gsl_linalg_exponential_ss" (((mpointer matrix) :pointer) ((mpointer exponential) :pointer) :mode) :invalidate (exponential) :return (exponential) :documentation "Calculate the matrix exponential by the scaling and squaring method described in Moler + Van Loan, SIAM Rev 20, 801 (1978). The matrix to be exponentiated is matrix, the returned exponential is exponential. The mode argument allows choosing an optimal strategy, from the table given in the paper, for a given precision.")
I have not tried it, so try it and see how it works. If you give it #2A((0.0d0 1.0d0) (-1.0d0 0.0d0)) it should return #2A((0.5403023058681384d0 0.841470984807895d0) (-0.841470984807895d0 0.5403023058681384d0)) i.e., [[cos(1), sin(1)], [-sin(1), cos(1)]]
Hi Liam,
I tried to compile this in the :gsl package (after loading it of course), and I got the error that mpointer was undefined.
I am more interested in the FFA version of GSLL. Where can I download it?
Thanks,
Tamas
Oops sorry, change "mpointer" to "pointer" in both cases. I am pushing the FFA version to a git repository on common-lisp.net as I develop it. If you have a user name and password there, you can clone with git clone ssh://yourusername@common-lisp.net/project/gsll/git gsll Because of a problem with public git service on cl.net, you can't clone it yet if you don't have a user name and password there; I will let you know when they fix that. Please keep in mind that this is an ongoing project, so many things don't work yet. In particular, there is no updated documentation and very few working examples. Also I've changed ffa in a few places from your version.
Liam