A more efficient version of the basic convolution example from Section 5.10.1 of 'Writing R Extensions', now rewritten for Rcpp and using Rcpp::NumericVector.
int nab = n_xa + n_xb - 1;
for (int i = 0; i < n_xa; i++)
for (int j = 0; j < n_xb; j++)
xab[i + j] += xa[i] * xb[j];
return xab ;
}
RcppExport SEXP convolve3cpp(SEXP a, SEXP b)
#define LOOPMACRO_CPP(name)
Vector< REALSXP > NumericVector