Le 20/06/10 03:32, Douglas Bates a écrit :
I want to return a named list of results from a call using Rcpp but
the components of the list are accumulated in stages. At the C++
level i have a templated class that contains several data members that
are themselves instances of classes.
What I hav
On 19 June 2010 at 20:32, Douglas Bates wrote:
| I want to return a named list of results from a call using Rcpp but
| the components of the list are accumulated in stages. At the C++
| level i have a templated class that contains several data members that
| are themselves instances of classes.
|
I want to return a named list of results from a call using Rcpp but
the components of the list are accumulated in stages. At the C++
level i have a templated class that contains several data members that
are themselves instances of classes.
What I have been doing is defining methods for each of t
( Reposting this here to Rcpp-devel since this might be of interest to
the readers of this list. )
Le 19/06/10 16:32, Chidambaram Annamalai a écrit :
>
> I have written code to compute multi-indices in R [1] and due to the
> recursive nature of the computation I need to pass around the *same*
>
Hi,
I've implemented lazy versions of them in Rcpp::sugar.
Here are some examples:
fx <- cxxfunction( signature( x = "integer" ), '
IntegerVector xx(x) ;
List res = lapply( xx, seq_len );
return res ;
', plugin = "Rcpp" )
checkEquals( fx( 1:10 ), lapply( 1:10, seq_le