| 103 | typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ; |
| 104 | |
| 105 | Intersect( const LHS_T& lhs, const RHS_T& rhs) : |
| 106 | intersect() |
| 107 | { |
| 108 | |
| 109 | SET lhs_set( get_const_begin(lhs), get_const_end(lhs) ) ; |
| 110 | SET rhs_set( get_const_begin(rhs), get_const_end(rhs) ) ; |
| 111 | |
| 112 | ITERATOR end = lhs_set.end() ; |
| 113 | ITERATOR rhs_end = rhs_set.end() ; |
| 114 | for( ITERATOR it=lhs_set.begin(); it != end; it++){ |
| 115 | if( rhs_set.find(*it) != rhs_end ) intersect.insert(*it) ; |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | Vector<RTYPE> get() const { |
| 120 | R_xlen_t n = intersect.size() ; |
nothing calls this directly
no test coverage detected