I think the safest bet would be to handle dispatch at the R level, which
would then call your internal C++ implementations. At least, it would be
easier / cleaner. Otherwise, you're right, you need to perform an 'ad-hoc'
dispatch based on the internal type / class and such.
-Kevin
On Sun, Dec 8,
Thanks, Dirk!
Follow up: That also means (I guess) that to be on the safe side I should write
a check-function that will check that the INTSXP and REALSXP really is a
matrix, i.e. that it has a dim attribute; right? Or are there facilities for
that?
Cheers
Søren
-Original Message-
F
Hi Søren,
On 8 December 2013 at 21:47, Søren Højsgaard wrote:
| Dear all,
|
| I want to do some computation on a matrix, irrespective of whether it is a
numeric matrix, an integer matrix or a sparse matrix (a dgCMatrix which can be
handled with RcppEigen). For simplicity, I want to compute the
Dear all,
I want to do some computation on a matrix, irrespective of whether it is a
numeric matrix, an integer matrix or a sparse matrix (a dgCMatrix which can be
handled with RcppEigen). For simplicity, I want to compute the sum of the
elements.
To do so I use a template
template
SEXP do
On 7 December 2013 at 15:04, Dirk Eddelbuettel wrote:
|
| Conrad released Armadillo 3.930 yesterday; I rolled it up for CRAN as well
| but it is not yet released on the CRAN side. [1]
|
| In the meantime you get versions from my site at
|
| http://dirk.eddelbuettel.com/code/rcpp/RcppArmadillo
Is this really the important thing? Seems like -g0 saves disk space, not memory?
(Loading the symbols into a debugger may require lots of memory, but that
is not the issue here.)
Header-only C++ packages require the compiler to effectively process one
huge source file instead of a bunch of smaller
Many times we [devs & users] get into a zone and go on extended binges into
our own projects neglecting the niceties of society. Then, while either
still on a particular path or even when we reach our destination, we don't
directly state our appreciation for those special individuals whose
project