コード例 #1
0
ファイル: binary_operator.hpp プロジェクト: cran/RcppHoney
 binary_operator<
     typename LHS::const_iterator,
     typename RHS::const_iterator,
     Op,
     NA
 > operator()(const LHS &lhs, const RHS &rhs, const Op &op) {
     return binary_operator<
         typename LHS::const_iterator,
         typename RHS::const_iterator,
         Op,
         NA
     >(lhs.begin(), lhs.end(), hooks::extract_dims(lhs), rhs.begin(),
         rhs.end(), hooks::extract_dims(rhs), op);
 }
コード例 #2
0
void operator()() {
    LHS lhs;
    RHS rhs;
    auto lhs_it = lhs.begin();
    auto rhs_it = rhs.begin();
    const auto lhs_end = lhs.end();
    const auto rhs_end = rhs.end();
    for( ; lhs_it != lhs_end && rhs_it != rhs_end; ) {
        std::tuple<typename LHS::rtype,typename RHS::rtype> t(*lhs_it, *rhs_it);
        //std::cout << "lhs_it="<<(*lhs_it)<<","<<(*rhs_it)<<std::endl;
        this->yield(t);
        ++lhs_it;
        ++rhs_it;
    }
}};