[Rcpp-devel] Differences between RcppEigen and RcppArmadillo

c s conradsand.arma at gmail.com
Thu Jun 14 19:16:09 CEST 2012


On Jun 15, 2012 12:11 AM, "Dirk Eddelbuettel" wrote:
> Thanks for that earlier hint re 'thin' and 'full' SVDs.

Armadillo has the standard svd() and the thin version too: svd_econ().
See http://arma.sourceforge.net/docs.html#svd_econ

> Conrad, any interest in switching to dgesdd?

Yes, but this is not simply a matter of making svd() use dgesdd()
instead of dgesvd().   Lapack authors added the dgsedd() function
instead of simply replacing the underlying algorithm used by dgesvd().
 This was done for a reason: the results produced by dgesvd() and
dgesdd() can be "slightly" different (where "slightly" is dependant on
matrix size and matrix content).  If Armadillo starts giving different
results all of a sudden, there would be a lot of displeased people.

I'll probably add an option to Armadillo's svd() to optionally use
dgesdd().  I've done something very similar for eig_sym() in Armadillo
3.2, where the faster "divide and conquer" algorithm for eigen
decomposition can be optionally used. See
http://arma.sourceforge.net/docs.html#eig_sym


More information about the Rcpp-devel mailing list