On 22 November 2012 at 22:41, Steffen Neumann wrote:
| Hi,
|
| On Thu, 2012-11-22 at 15:22 -0600, Dirk Eddelbuettel wrote:
| ...
| > But as soon as we change a structure or header somewhere, things potentiall
| > go boom. We try to be careful, but we are also eager to get new "stuff"
out.
|
|
Hi,
On Thu, 2012-11-22 at 15:22 -0600, Dirk Eddelbuettel wrote:
...
> But as soon as we change a structure or header somewhere, things potentiall
> go boom. We try to be careful, but we are also eager to get new "stuff" out.
New stuff is great! The problem is if the ABI changes,
and normal share
On 22 November 2012 at 21:05, Laurent Gatto wrote:
| On 22 November 2012 20:37, Steffen Neumann wrote:
| > Hi,
| >
| > thanks Dan for fixing this. I can vaguely remember
| > we've had such a problem before.
|
| We had this issue 6 months ago, when Rcpp 0.9.12 was released (see [1]
| and commit r
On 22 November 2012 20:37, Steffen Neumann wrote:
> Hi,
>
> thanks Dan for fixing this. I can vaguely remember
> we've had such a problem before.
We had this issue 6 months ago, when Rcpp 0.9.12 was released (see [1]
and commit r67124).
> Is there any way to avoid that problem in the future ?
>
Hi,
thanks Dan for fixing this. I can vaguely remember
we've had such a problem before.
Is there any way to avoid that problem in the future ?
Is it that BioC needs to recompile packages when
their dependencies change ?
Or should we have some *maximum* Rcpp version number
in the mzR dependen
Thank you JJ and Dirk, For whatever it's worth, I had already pulled the
attributes vignette and read it multiple times before making a posting. I
found the vignette to be very clear until the section on working under
packages. As mentioned, I had some difficulty to discern the old-to-new
compar
On 22 November 2012 at 16:42, Romain Francois wrote:
| Le 22/11/12 16:25, Hadley Wickham a écrit :
| >> #define DISPATCH_METHOD(method, x) \
| >>switch( TYPEOF(x) ){ \
| >> case REALSXP: \
| >>return method(x);\
| >> case INTSXP:
Le 22/11/12 16:25, Hadley Wickham a écrit :
#define DISPATCH_METHOD(method, x) \
switch( TYPEOF(x) ){ \
case REALSXP: \
return method(x);\
case INTSXP:\
return method(x); \
case STRSXP:\
> #define DISPATCH_METHOD(method, x) \
> switch( TYPEOF(x) ){ \
> case REALSXP: \
> return method(x);\
> case INTSXP:\
> return method(x); \
> case STRSXP:\
> return method(x); \
> ca
>
> The name of the macro should in my view giev an idea that this is meant
> for vectors, e.g. DISPATCH_VECTOR_METHOD or something
>
+1
I was actually asking whether we should include your RcppScript as an extra
utility. Does that make sense?
___
Rcpp-
>
> The constructor of Vector based in iterator takes care of the business. So
> you don't need to write a dispatch.
>
> I like the idea of DISPATCH_METHOD, we would need extras at least for
> RAWSXP, CPLXSXP and VECSXP .
>
This turned out really nice!
> I have this as RcppScript now on my ~/bin
Got it now. With a fresh version of Rcpp (rev 4018), you can do:
#include
using namespace Rcpp;
template
SEXP unique_generic( const Vector vector ) {
typedef RCPP_UNORDERED_SET< typename Vector::stored_type >
SET ;
SET set(vector.begin(), vector.end());
return Vector( set.begin(),
Le 22/11/12 13:42, JJ Allaire a écrit :
Would something like this work? (Romain you probably know best whether
this will actually work out over a large range of scenarios as well as
if the std::string specialization would work)
#include
using namespace Rcpp;
template
RObject unique_generic(RO
Would something like this work? (Romain you probably know best whether this
will actually work out over a large range of scenarios as well as if the
std::string specialization would work)
#include
using namespace Rcpp;
template
RObject unique_generic(RObject x) {
Vector vector = as >(x);
Le 22/11/12 03:59, John Merrill a écrit :
tl;dr summary -- is there a way to incorporate multiple functions into
an inline call? Specifically, is there a way to include a templated
function in an inline compilation?
Consider the following outline:
template
void InsertTypedVector
}
RcppExport
15 matches
Mail list logo