Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-11 Thread Ravi Varadhan
On Behalf Of Martin Maechler Sent: Saturday, April 05, 2008 1:52 PM To: Rory Winston Cc: r-devel@r-project.org Subject: Re: [Rd] Adding a Matrix Exponentiation Operator >>>>> "RW" == Rory Winston <[EMAIL PROTECTED]> >>>>> on Sat, 5 Apr 2008 14:4

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread rory . winston
Orange -Original Message- From: Martin Maechler <[EMAIL PROTECTED]> Date: Tue, 8 Apr 2008 15:57:18 To:Vincent Goulet <[EMAIL PROTECTED]> Cc:Rory Winston <[EMAIL PROTECTED]>, r-devel@r-project.org Subject: Re: [Rd] Adding a Matrix Exponentiation Operator >>>>&g

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread Martin Maechler
> "rw" == rory winston <[EMAIL PROTECTED]> > on Tue, 8 Apr 2008 14:06:26 + writes: rw> Hi martin rw> Actually I did read your email. If you had actually read *my* email you would have seen that I am not using the windows version, which is what you explicitly referred to e

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread Martin Maechler
> "VG" == Vincent Goulet <[EMAIL PROTECTED]> > on Tue, 08 Apr 2008 09:28:00 -0400 writes: VG> Le dim. 6 avr. à 07:01, Rory Winston a écrit : >> Hi Martin >> >> Thanks for the detailed reply. I had a look at the matrix power >> implementation in the actuar package a

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread Vincent Goulet
Le dim. 6 avr. à 07:01, Rory Winston a écrit : > Hi Martin > > Thanks for the detailed reply. I had a look at the matrix power > implementation in the actuar package and the modified version in the > expm > package. I have a couple of questions/comments: > > 1. Firstly, I seem to have trouble lo

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread Rory Winston
Hi Martin I have changed the implementation slightly so that it now handles complex matrices as well. Take a look and see what you think. I realise that a lot of the if/else mode checking could be merged. Cheers Rory SEXP do_matexp(SEXP call, SEXP op, SEXP args, SEXP rho) { int nrows, ncols;

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread Rory Winston
Hi Martin Thanks for the detailed reply. I had a look at the matrix power implementation in the actuar package and the modified version in the expm package. I have a couple of questions/comments: 1. Firstly, I seem to have trouble loading expm. > install.packages("expm",repos="http://R-Forge.R-p

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread Rory Winston
Thanks Antonio, thats a good suggestion. On Sat, Apr 5, 2008 at 5:51 PM, Antonio, Fabio Di Narzo < [EMAIL PROTECTED]> wrote: > 2008/4/5, Rory Winston <[EMAIL PROTECTED]>: > > > > > /* Convenience function */ > > static void copyMatrixData(SEXP a, SEXP b, int nrows, int ncols, int > mode) { > >

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-05 Thread Martin Maechler
> "RW" == Rory Winston <[EMAIL PROTECTED]> > on Sat, 5 Apr 2008 14:44:44 +0100 writes: RW> Hi all I recently started to write a matrix RW> exponentiation operator for R (by adding a new operator RW> definition to names.c, and adding the following code to RW> arrays.c).

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-05 Thread Antonio, Fabio Di Narzo
2008/4/5, Rory Winston <[EMAIL PROTECTED]>: > > /* Convenience function */ > static void copyMatrixData(SEXP a, SEXP b, int nrows, int ncols, int mode) { > for (int i=0; i < ncols; ++i) > for (int j=0; j < nrows; ++j) > REAL(b)[i * nrows + j] = REAL(a)[i * nrows + j]; > } I wou