I am developing classes for sparse matrices with an Rcpp interface that includes
Rcpp::Dimension dim() const {return Rcpp::Dimension(nr(), nc());}
Rcpp::NumericMatrix asmatrix() const;
The implementation of the asmatrix method begins with
Rcpp::NumericMatrix ans(dim(
On Wed, Jun 1, 2011 at 3:51 AM, Christian Gunning wrote:
> On Tue, May 31, 2011 at 10:55 AM,
> wrote:
>
>
> I didn't see anything. If you're not subscribed to the list,
> submissions silently fail. Plus, you must send from the subscribing
> address. I've made this mistake a few times...
>
Ye
Romain,
Thanks a lot. The templated uBlas2Rcpp function works very nicely!
Cheers,
Ced
On 01/06/11 14:14, Romain Francois wrote:
Le 01/06/11 14:28, Cedric Ginestet a écrit :
Dear Romain,
Thank you very much for your help. I tried what you suggested by
including the following templated function
Le 01/06/11 14:28, Cedric Ginestet a écrit :
Dear Romain,
Thank you very much for your help. I tried what you suggested by
including the following templated function in templatedFunction.h, as
follows:
template
Rcpp::Vector< Rcpp::traits::r_sexptype_traits::rtype >
ublas2rcpp( const vector& x )
Dear Romain,
Thank you very much for your help. I tried what you suggested by
including the following templated function in templatedFunction.h, as
follows:
template
Rcpp::Vector< Rcpp::traits::r_sexptype_traits::rtype >
ublas2rcpp( const vector& x ){
return Rcpp::Vector< r_sexptype_traits::r
Hi,
I've not used uBlas, but what you are trying to do is quite similar to
what we do in RcppArmadillo.
You can probably manage to guess the output type from the input type, so
you only have to parameterise your template on the input type. something
like (untested) :
template
Rcpp::Vector
Dear Rcpp experts,
I have started to use the uBlas library, and I am trying to ensure that
I can pass from uBlas vectors to Rcpp vectors relatively easily. So far,
I have tried the following templated function:
///
using name