Displaying 2 results from an estimated 2 matches for "cpp_lapply".
2010 May 17
0
Rcpp 0.8.0 on CRAN
...ws quick prototyping of compiled code. All our unit tests are based
on cppfunction and can serve as examples of how to use the mechanism. For example
this function (from the runit.GenericVector.R unit test file) defines from
R a C++ (simplified) version of lapply:
## create a compiled function cpp_lapply using cppfunction
cpp_lapply <- cppfunction(signature(x = "list", g = "function" ),
'Function fun(g) ;
List input(x) ;
List output( input.size() ) ;
std::transform( input.begin(), input.end(), output.begin(), fun ) ;
output.names() = input.names() ;...
2010 May 17
0
Rcpp 0.8.0 on CRAN
...ws quick prototyping of compiled code. All our unit tests are based
on cppfunction and can serve as examples of how to use the mechanism. For example
this function (from the runit.GenericVector.R unit test file) defines from
R a C++ (simplified) version of lapply:
## create a compiled function cpp_lapply using cppfunction
cpp_lapply <- cppfunction(signature(x = "list", g = "function" ),
'Function fun(g) ;
List input(x) ;
List output( input.size() ) ;
std::transform( input.begin(), input.end(), output.begin(), fun ) ;
output.names() = input.names() ;...