Message-ID: <BANLkTi=Y2-YVerzRo80pyFFw4ieUcnJTxA@mail.gmail.com>
Date: 2011-05-31T01:39:44Z
From: Conrad Sand
Subject: [Rcpp-devel] trans() changed in latest RcppArmadillo
In-Reply-To: <BANLkTi=4jic1NHSin+WVQnur_JZVDKbDPQ@mail.gmail.com>
Hi Baptiste,
Thanks for the bug report. I'll take a look at the underlying issues.
On 31 May 2011 09:48, baptiste auguie <baptiste.auguie at googlemail.com> wrote:
> Sorry, I had too many spaces in the vectors. The conclusion is the same though.
>
> library(inline)
> require( RcppArmadillo )
>
> ## let's calculate this product
> c(-1-1i, 1-1i) %*% c(1i, -1i)
> ?## 0-2i
>
> ## trans() with v0.2.19
> fx <- cxxfunction( signature() , '
> ?arma::cx_colvec A = "(-1,-1) (+1,-1);", B = "(+0,1) (+0,-1);" ;
> ? ? ? ? ? ? ? ?arma::cx_colvec res = trans(A) * B;
>
> ? ? ? ? ? ? ? ?return wrap( res ) ;
> ? ? ? ?', plugin = "RcppArmadillo" )
>
> fx()
> ## 0-2i
>
> ## strans() with v0.2.21
> fx <- cxxfunction( signature() , '
> ?arma::cx_colvec A = "(-1,-1) (+1,-1);", B = "(+0,1) (+0,-1);" ;
> ? ? ? ? ? ? ? ?arma::cx_colvec res = strans(A) * B;
> ? ? ? ? ? ? ? ?return wrap( res ) ;
> ? ? ? ?', plugin = "RcppArmadillo" )
>
> fx()
> ## 1-1i