STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | List of all members
__gnu_parallel::__union_func< _IIter, _OutputIterator, _Compare > Struct Template Reference

#include <parallel/set_operations.h>

Public Types

typedef std::iterator_traits
< _IIter >::difference_type 
_DifferenceType
 

Public Member Functions

 __union_func (_Compare __comp)
 
_OutputIterator _M_invoke (_IIter __a, const _IIter __b, _IIter __c, const _IIter __d, _OutputIterator __r) const
 
_DifferenceType __count (_IIter __a, _IIter __b, _IIter __c, _IIter __d) const
 
_OutputIterator __first_empty (_IIter __c, _IIter __d, _OutputIterator __out) const
 
_OutputIterator __second_empty (_IIter __a, _IIter __b, _OutputIterator __out) const
 

Public Attributes

_Compare _M_comp
 

Member Typedef Documentation

template<class _IIter , class _OutputIterator , class _Compare >
typedef std::iterator_traits<_IIter>::difference_type __gnu_parallel::__union_func< _IIter, _OutputIterator, _Compare >::_DifferenceType

Constructor & Destructor Documentation

template<class _IIter , class _OutputIterator , class _Compare >
__gnu_parallel::__union_func< _IIter, _OutputIterator, _Compare >::__union_func ( _Compare  __comp)
inline
282 : _M_comp(__comp) {}
_Compare _M_comp
Definition: set_operations.h:284

Member Function Documentation

template<class _IIter , class _OutputIterator , class _Compare >
_DifferenceType __gnu_parallel::__union_func< _IIter, _OutputIterator, _Compare >::__count ( _IIter  __a,
_IIter  __b,
_IIter  __c,
_IIter  __d 
) const
inline
315  {
316  _DifferenceType __counter = 0;
317 
318  while (__a != __b && __c != __d)
319  {
320  if (_M_comp(*__a, *__c))
321  { ++__a; }
322  else if (_M_comp(*__c, *__a))
323  { ++__c; }
324  else
325  {
326  ++__a;
327  ++__c;
328  }
329  ++__counter;
330  }
331 
332  __counter += (__b - __a);
333  __counter += (__d - __c);
334  return __counter;
335  }
std::iterator_traits< _IIter >::difference_type _DifferenceType
Definition: set_operations.h:280
_Compare _M_comp
Definition: set_operations.h:284
template<class _IIter , class _OutputIterator , class _Compare >
_OutputIterator __gnu_parallel::__union_func< _IIter, _OutputIterator, _Compare >::__first_empty ( _IIter  __c,
_IIter  __d,
_OutputIterator  __out 
) const
inline
339  { return std::copy(__c, __d, __out); }
template<class _IIter , class _OutputIterator , class _Compare >
_OutputIterator __gnu_parallel::__union_func< _IIter, _OutputIterator, _Compare >::__second_empty ( _IIter  __a,
_IIter  __b,
_OutputIterator  __out 
) const
inline
343  { return std::copy(__a, __b, __out); }
template<class _IIter , class _OutputIterator , class _Compare >
_OutputIterator __gnu_parallel::__union_func< _IIter, _OutputIterator, _Compare >::_M_invoke ( _IIter  __a,
const _IIter  __b,
_IIter  __c,
const _IIter  __d,
_OutputIterator  __r 
) const
inline
289  {
290  while (__a != __b && __c != __d)
291  {
292  if (_M_comp(*__a, *__c))
293  {
294  *__r = *__a;
295  ++__a;
296  }
297  else if (_M_comp(*__c, *__a))
298  {
299  *__r = *__c;
300  ++__c;
301  }
302  else
303  {
304  *__r = *__a;
305  ++__a;
306  ++__c;
307  }
308  ++__r;
309  }
310  return std::copy(__c, __d, std::copy(__a, __b, __r));
311  }
_Compare _M_comp
Definition: set_operations.h:284

Member Data Documentation

template<class _IIter , class _OutputIterator , class _Compare >
_Compare __gnu_parallel::__union_func< _IIter, _OutputIterator, _Compare >::_M_comp

The documentation for this struct was generated from the following file: