Rcpp Version 0.12.12
Subsetter.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Rcpp::SubsetProxy< RTYPE, StoragePolicy, RHS_RTYPE, RHS_NA, RHS_T >
 

Namespaces

 Rcpp
 Rcpp API.
 

Macros

#define RCPP_GENERATE_SUBSET_PROXY_OPERATOR(__OPERATOR__)
 

Macro Definition Documentation

#define RCPP_GENERATE_SUBSET_PROXY_OPERATOR (   __OPERATOR__)
Value:
template <int RTYPE_OTHER, template <class> class StoragePolicyOther, \
int RHS_RTYPE_OTHER, bool RHS_NA_OTHER, typename RHS_T_OTHER> \
Vector<RTYPE, StoragePolicy> operator __OPERATOR__ ( \
const SubsetProxy<RTYPE_OTHER, StoragePolicyOther, RHS_RTYPE_OTHER, \
RHS_NA_OTHER, RHS_T_OTHER>& other) { \
Vector<RTYPE, StoragePolicy> result(indices_n); \
if (other.indices_n == 1) { \
for (int i = 0; i < indices_n; ++i) \
result[i] = lhs[indices[i]] __OPERATOR__ other.lhs[other.indices[0]]; \
} else if (indices_n == other.indices_n) { \
for (int i = 0; i < indices_n; ++i) \
result[i] = lhs[indices[i]] __OPERATOR__ other.lhs[other.indices[i]]; \
} else { \
stop("index error"); \
} \
return result; \
}
void NORET stop(const char *fmt, Args &&...args)
Definition: exceptions.h:51

Definition at line 229 of file Subsetter.h.