Skip to content
Prev 4895 / 10988 Next

[Rcpp-devel] Sparse matrices with RcppArmadillo

c s
Armadillo sparse matrices are stored in Compressed Sparse Column format:

http://en.wikipedia.org/wiki/Sparse_matrix#Compressed_sparse_column_.28CSC_or_CCS.29

This layout is used by a majority of external solvers.

It would be far more efficient to take this layout into account when
copying matrices, instead of blindly (and slowly) copying element by
element.


On Sunday, December 9, 2012, Romain Francois <romain at r-enthusiasts.com>
wrote:
RcppArmadillo, so I do:
supported, but I might be wrong here. I have no indication that dgCMatrix
matrices can be "converted" to SpMat's. I know that I can work with
dgCMatrix matrices with RcppEigen, but what I need is to extract
submatrices and that is very easy to do with RcppArmadillo.
following the recipee from how these are handled in RcppEigen:
maybe Conrad has insights.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20121209/1101076b/attachment.html>