26 #ifndef MPBLOCKS_UTIL_SET_OPERATIONS_HPP_
27 #define MPBLOCKS_UTIL_SET_OPERATIONS_HPP_
34 template <
typename InputIt1,
typename InputIt2>
35 bool Contains(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2);
39 template <
typename InputIt1,
typename InputIt2,
typename OutputIt1,
42 InputIt2 last2, OutputIt1 out1, OutputIt2 out2);
48 template <
typename InputIt1,
typename InputIt2,
typename OutputIt1,
49 typename OutputIt2,
typename OutputIt3>
51 InputIt2 last2, OutputIt1 out1, OutputIt2 out2,
64 template <
typename InputIt1,
typename InputIt2>
65 bool Contains(InputIt1 first1, InputIt1 last1, InputIt2 first2,
67 while (first2 != last2) {
68 for (; *first1 < *first2; ++first1) {
69 if (first1 == last1) {
73 if (*first2 < *first1) {
83 template <
typename InputIt1,
typename InputIt2,
typename OutputIt1,
86 InputIt2 last2, OutputIt1 out1, OutputIt2 out2) {
87 while (first1 != last1) {
88 if (first2 == last2) {
92 if (*first1 < *first2) {
95 if (*first2 < *first1) {
107 template <
typename InputIt1,
typename InputIt2,
typename OutputIt1,
108 typename OutputIt2,
typename OutputIt3>
110 InputIt2 last2, OutputIt1 out1, OutputIt2 out2,
111 OutputIt3 intersect) {
112 while (first1 != last1) {
113 if (first2 == last2) {
118 if (*first1 < *first2) {
122 if (*first2 < *first1) {
126 *intersect++ = *first1++;
137 #endif // MPBLOCKS_UTIL_SET_OPERATIONS_HPP_
void IntersectionAndDifference(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt1 out1, OutputIt2 out2, OutputIt3 intersect)
Collect in out1 elements from the first set not found in the second, and collect in out2 elements fro...
void SymmetricDifference(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt1 out1, OutputIt2 out2)
Collect in out1 elements from the first set not found in the second, and collect in out2 elements fro...
bool Contains(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2)
Returns true if the seconds set is a subset of the first set.
__host__ __device__ Scalar & set(LValue< Scalar, ROWS, COLS, Exp > &M)
Char8_t * copy(const Char8_t *s)