Re: [Rcpp-devel] Multiplication of ComplexVector?

2010-08-16 Thread Romain Francois
Thank you for your interest in Rcpp. Le 17/08/10 02:19, Christian Gunning a écrit : Dear list, I'm trying to use the ComplexVector class, and I'm having difficulty with multiplication. I sugar multiplication, element-by-element multiplication (no * operator for either), and using temporary Rcom

Re: [Rcpp-devel] Multiplication of ComplexVector?

2010-08-16 Thread baptiste auguie
Hi, On 17 August 2010 03:24, Dirk Eddelbuettel wrote: > > On 16 August 2010 at 19:43, Dirk Eddelbuettel wrote: [...] > The only trouble is that nobody has written the corresponding 'glue' code to > make > >      arma::cx_vec a1(y1.begin(), y1.size(), false); > > happen: create an Armadillo comp

Re: [Rcpp-devel] Multiplication of ComplexVector?

2010-08-16 Thread Dirk Eddelbuettel
On 16 August 2010 at 19:43, Dirk Eddelbuettel wrote: | Hi Christian, | | Thanks for your interest in Rcpp, and for posting here. | | On 16 August 2010 at 17:19, Christian Gunning wrote: | | Dear list, | | | | I'm trying to use the ComplexVector class, and I'm having difficulty | | with multipli

Re: [Rcpp-devel] Multiplication of ComplexVector?

2010-08-16 Thread Dirk Eddelbuettel
Hi Christian, Thanks for your interest in Rcpp, and for posting here. On 16 August 2010 at 17:19, Christian Gunning wrote: | Dear list, | | I'm trying to use the ComplexVector class, and I'm having difficulty | with multiplication. I sugar multiplication, element-by-element | multiplication (no

[Rcpp-devel] Multiplication of ComplexVector?

2010-08-16 Thread Christian Gunning
Dear list, I'm trying to use the ComplexVector class, and I'm having difficulty with multiplication. I sugar multiplication, element-by-element multiplication (no * operator for either), and using temporary Rcomplex variables (don't really understand what I'm doing here). I was able to successful

Re: [Rcpp-devel] Using sugar expressions for evaluating deviance residuals

2010-08-16 Thread Douglas Bates
On Mon, Aug 16, 2010 at 11:47 AM, Romain Francois wrote: > Le 16/08/10 15:33, Douglas Bates a écrit : >> >> On Mon, Aug 16, 2010 at 8:10 AM, Romain Francois >>  wrote: >>> >>> Nothing really conclusive here ... >>> >>> I've added a preliminary version of SUGAR_BLOCK_3 (only for the case >>> where

Re: [Rcpp-devel] Using sugar expressions for evaluating deviance residuals

2010-08-16 Thread Romain Francois
Le 16/08/10 15:33, Douglas Bates a écrit : On Mon, Aug 16, 2010 at 8:10 AM, Romain Francois wrote: Nothing really conclusive here ... I've added a preliminary version of SUGAR_BLOCK_3 (only for the case where all inputs are vectors) so that one can write : incl8<- ' inline double y_log_y(dou

Re: [Rcpp-devel] Using sugar expressions for evaluating deviance residuals

2010-08-16 Thread Romain Francois
Le 16/08/10 15:33, Douglas Bates a écrit : On Mon, Aug 16, 2010 at 8:10 AM, Romain Francois wrote: Nothing really conclusive here ... I've added a preliminary version of SUGAR_BLOCK_3 (only for the case where all inputs are vectors) so that one can write : incl8<- ' inline double y_log_y(dou

Re: [Rcpp-devel] Using sugar expressions for evaluating deviance residuals

2010-08-16 Thread Douglas Bates
On Mon, Aug 16, 2010 at 8:10 AM, Romain Francois wrote: > Nothing really conclusive here ... > > I've added a preliminary version of SUGAR_BLOCK_3 (only for the case where > all inputs are vectors) so that one can write : > > incl8 <- ' > inline double y_log_y(double y, double mu) { >    return y

Re: [Rcpp-devel] Using sugar expressions for evaluating deviance residuals

2010-08-16 Thread Romain Francois
Nothing really conclusive here ... I've added a preliminary version of SUGAR_BLOCK_3 (only for the case where all inputs are vectors) so that one can write : incl8 <- ' inline double y_log_y(double y, double mu) { return y ? y*log(y/mu) : 0.; } inline double yMu(double y, double mu) {