Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-06-07 Thread Conrad Sand
For tiny matrices (ie. <= 4x4), Armadillo by default uses fast algorithms for det(), inv() and solve(). In rare instances these fast algorithms may not be as precise as the standard algorithms found in Lapack. As such, in the updated version of Armadillo I've added an option to det(), inv() and s

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-06-07 Thread Savitsky, Terrance
ginal Message- From: Conrad Sand [mailto:conradsand.r...@gmail.com] Sent: Monday, June 06, 2011 8:53 AM To: baptiste auguie Cc: Savitsky, Terrance; rcpp-de...@r-forge.wu-wien.ac.at Subject: Re: [Rcpp-devel] trans() changed in latest RcppArmadillo Hi Baptise & Terrance, I've fixed sev

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-06-06 Thread baptiste auguie
Hi Conrad, all, Thanks for the fixes and fast release. I have just tested RcppArmadillo_0.2.22 on my code and it works fine. Best regards, baptiste On 7 June 2011 03:52, Conrad Sand wrote: > Hi Baptise & Terrance, > > I've fixed several issues in Armadillo and released an updated version > (1

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-06-06 Thread Conrad Sand
Hi Baptise & Terrance, I've fixed several issues in Armadillo and released an updated version (1.99.4). Dirk has wrapped it up in RcppArmadillo 0.2.22, which should be hitting the mirrors soon. Could you try your code again and let me know if you encounter any problems ? With regards, Conrad

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-31 Thread baptiste auguie
Thanks so much, Conrad! Best regards, Baptiste On 31 May 2011 23:37, Conrad Sand wrote: > I've found the cause of the issue (involves handling of small matrices). > > The fix is easy (and already done in the SVN repo), but I currently > don't have the time to roll out another release.  I'll aim

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-31 Thread Conrad Sand
I've found the cause of the issue (involves handling of small matrices). The fix is easy (and already done in the SVN repo), but I currently don't have the time to roll out another release. I'll aim to release a fix on the weekend, which will also give me time to double-check if there is a proble

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread Conrad Sand
Hi Baptiste, Thanks for the bug report. I'll take a look at the underlying issues. On 31 May 2011 09:48, baptiste auguie wrote: > Sorry, I had too many spaces in the vectors. The conclusion is the same > though. > > library(inline) > require( RcppArmadillo ) > > ## let's calculate this produc

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread Conrad Sand
On 31 May 2011 05:02, Savitsky, Terrance wrote: > Dr. Sanderson, I've been able to verify that my issue resides in the > inv() function (that I typically apply to small p x p matrices, where p > = 3 - 10). In particular, the new version/algorithm induces numerical > instability. This is a bit st

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread baptiste auguie
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)

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread baptiste auguie
After a couple hours switching back and forth between versions, I found a problem with the scalar product of complex vectors. Here is a minimal example, library(inline) require( RcppArmadillo ) ## let's calculate this product c(-1-1i, 1-1i) %*% c(1i, -1i) ## 0-2i ## trans() with v0.2.19

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread baptiste auguie
I was a bit optimistic yesterday; I have not yet been able to produce a minimal example but it seems trans/strans was not the end of the story in my code. Something else was broken with the change to 0.2.21.Thankfully the end results are very visibly wrong. Best regards, Baptiste On 31 May 2011

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread Savitsky, Terrance
Dr. Sanderson, I've been able to verify that my issue resides in the inv() function (that I typically apply to small p x p matrices, where p = 3 - 10). In particular, the new version/algorithm induces numerical instability. I've not yet tested that the results of the inv() computation are general

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread Savitsky, Terrance
Hello Dr. Sanderson. Thank you, so much, for your work; along with the work of Dirk and Romain, your tools make it possible for me to have impact I otherwise would never achieve. Anyway, I separately tested my (typical) use of trans() in a simple code and received no problems. I have various Rcp

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread Conrad Sand
On 30 May 2011, Terrance Savitsky wrote: > Hello, After upgrading to the 0.2.21 release of RcppArmadillo, my > previously working code (across many functions) ceased working (on a > Windows XP installation). I re-installed the previous version (0.2.20) > from CRAN (via a server location not yet up

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread Dirk Eddelbuettel
On 29 May 2011 at 21:26, Savitsky, Terrance wrote: | Hello, After upgrading to the 0.2.21 release of RcppArmadillo, my previously | working code (across many functions) ceased working (on a Windows XP | installation). I re-installed the previous version (0.2.20) from CRAN (via a | server location

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-29 Thread Savitsky, Terrance
Hello, After upgrading to the 0.2.21 release of RcppArmadillo, my previously working code (across many functions) ceased working (on a Windows XP installation). I re-installed the previous version (0.2.20) from CRAN (via a server location not yet updated to 0.2.21); didn't fix it. The timing may

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-29 Thread Dirk Eddelbuettel
Hi Baptiste, On 30 May 2011 at 10:13, baptiste auguie wrote: | Dear list, | | The latest RcppArmadillo broke some code that worked for me before, | and produces erroneous results. I have just tracked down the origin of | the problem to a change in the armadillo library: applying trans() to | com

[Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-29 Thread baptiste auguie
Dear list, The latest RcppArmadillo broke some code that worked for me before, and produces erroneous results. I have just tracked down the origin of the problem to a change in the armadillo library: applying trans() to complex matrices now takes the complex conjugate as well as transposing. Using