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

Dirk Eddelbuettel edd at debian.org
Mon May 30 01:05:52 CEST 2011

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
| complex matrices now takes the complex conjugate as well as
| transposing. Using strans() restores the original behavior. I though
| I'd warn other RcppArmadillo users to check their code if it uses
| complex linear algebra. Rather curiously, strans() cannot be applied
| on real matrices, so trans() should be kept there.

Yes, it is in the release notes:

0.2.21  2011-05-27

    o   Upgraded to Armadillo release 1.99.3 "v2.0 beta 3" 

          * stricter size checking for row and column vectors
          * added .count() member function to running_stat and running_stat_vec

0.2.20  2011-05-25

    o   Upgraded to Armadillo release 1.99.2 "v2.0 beta 2" (and 1.99.1 before)

          * faster inverse of symmetric matrices
	  * faster element access for fixed size matrices
	  * faster multiplication of tiny matrices (eg. 4x4)
	  * faster compund expressions containing submatrices
	  * added handling of arbitrarily sized empty matrices (eg. 5x0)
	  * added syl()
	  * added strans()
	  * added symmatu()/symmatl()
	  * added submatrices of submatrices
	  * htrans() has been deprecated; use trans() instead
	  * trans() now takes the complex conjugate when transposing a
            complex matrix
	  * .is_vec() now outputs true for empty matrices
	  * most functions with matrix inputs no longer throw exceptions when
            given empty matrices (eg. 5x0)

    o   Added a new subdirectory examples/ seeded with a nice Vector
        Autoregression simulation simulation example by Lance Bachmeier

    o   Rewrote armadillo_version as to no longer require an instance 
        of arma::arma_version, with tanks to Conrad for the suggestion

The trans() / strans() change is one of the reasons Conrad wants to call the
next release 2.0.0 to signal the break.  Sorry if that caught you by
surprise.  I still think it is a good thing that Conrad develops so fast and
thoroughly.  But yes, "surprises" like the one that you got may then happen
mit development versions.


Gauss once played himself in a zero-sum game and won $50.
                      -- #11 at http://www.gaussfacts.com

More information about the Rcpp-devel mailing list