[Rcpp-devel] Sparse matrix operations

Dirk Eddelbuettel edd at debian.org
Tue Feb 4 13:26:32 CET 2014


On 4 February 2014 at 09:30, Søren Højsgaard wrote:
| Just to clarify this (for myself): 
| 
| In a broader perspective, isn't it so now that there is very limited need for as< >(some_SEXP)? 
| 
| When calling from R we can declare input to be NumericMatrices, NumericVectors ets, but we can also declare it to be arma-matrices, arma-vectors etc AND also Eigen-matrices etc?
| 
| Where one definitely needs as< >() is when inputting some SEXP which one wants to coerce to some STL container? 
| 
| Are there other cases where one definitely needs the coercion via as<>()??

"Whenever implicit coercion does not work"

It really is that murky. Template programming is hard.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list