[Rcpp-devel] Armadillo version in RcppArmadillo

Romain Francois romain at r-enthusiasts.com
Fri Jul 16 10:28:20 CEST 2010


Le 16/07/10 01:59, Davor Cubranic a écrit :
>
> On 2010-07-15, at 11:52 AM, Dirk Eddelbuettel wrote:
>
>> Thanks for checking. Updating to Armadillo 0.9.52 is on the TODO list, but
>> given that CRAN is effectively closed right now and useR! is next week, we're
>> in no hurry.  I'll try to get to it, maybe even while at useR!.
>
> No worries, there isn't much you can do in this case. Enjoy the conference!
>
> Any ideas on why using an intermediary variable ("mat c = chol(m); c.diag()") seems to be slightly slower than wrapping Cholesky's result in a 'mat' constructor ("mat(chol(m)).diag()")?
>
> Davor

Hi Davor,

Could you provide a reproducible example. With the last version of 
inline, one can use cxxfunction to compile code that uses RcppArmadillo:

fx <- cxxfunction( signature(x = "integer", y = "numeric" ) , '
		int dim = as<int>( x ) ;
		arma::mat z = as<double>(y) * arma::eye<arma::mat>( dim, dim ) ;
		return wrap( arma::accu(z) ) ;
	', plugin = "RcppArmadillo" )
	fx( 2L, 5 )


Also, to reply to the question "what is the version of armadillo that is 
embedded in RcppArmadillo", you can use :

 > RcppArmadillo:::armadillo_version()
major minor patch
     0     9    10

Romain

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/bc8jNi : Rcpp 0.8.4
|- http://bit.ly/dz0RlX : bibtex 0.2-1
`- http://bit.ly/a5CK2h : Les estivales 2010



More information about the Rcpp-devel mailing list