Le 14/06/2017 à 16:06, Serguei Sokol a écrit :
Le 14/06/2017 à 15:21, Douglas Bates a écrit :

...
That is the format of the dgTMatrix class from the Matrix package for R but not, as far as I can tell, in Armadillo. A brief glance at the Armadillo documentation indicates that sparse matrices are always in the compressed sparse column (CSC) format.
Indeed, but nothing prevents Binxiang to develop a wrap() that will convert
armadillo format to one or many of R formats, right?
I realize that I was asking too much to wrap(). After having a glance on
http://gallery.rcpp.org/articles/custom-templated-wrap-and-as-for-seamingless-interfaces/
I understand that it cannot convert a given object to more than one R format.
There is no mechanism equivalent to T as in as<T>().
Given this, I agree that the most logical solution would be to stay with
CSC format which is common to Armadillo and Matrix package.
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to