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::__symmetric_difference_func< _IIter, _OutputIterator, _Compare > Struct Template Reference

#include <parallel/set_operations.h>

Public Types

typedef std::iterator_traits
< _IIter > 
_TraitsType
 
typedef
_TraitsType::difference_type 
_DifferenceType
 
typedef std::pair< _IIter, _IIter > _IteratorPair
 

Public Member Functions

 __symmetric_difference_func (_Compare __comp)
 
_OutputIterator _M_invoke (_IIter __a, _IIter __b, _IIter __c, _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<typename _IIter , typename _OutputIterator , typename _Compare >
typedef _TraitsType::difference_type __gnu_parallel::__symmetric_difference_func< _IIter, _OutputIterator, _Compare >::_DifferenceType
template<typename _IIter , typename _OutputIterator , typename _Compare >
typedef std::pair<_IIter, _IIter> __gnu_parallel::__symmetric_difference_func< _IIter, _OutputIterator, _Compare >::_IteratorPair
template<typename _IIter , typename _OutputIterator , typename _Compare >
typedef std::iterator_traits<_IIter> __gnu_parallel::__symmetric_difference_func< _IIter, _OutputIterator, _Compare >::_TraitsType

Constructor & Destructor Documentation

template<typename _IIter , typename _OutputIterator , typename _Compare >
__gnu_parallel::__symmetric_difference_func< _IIter, _OutputIterator, _Compare >::__symmetric_difference_func ( _Compare  __comp)
inline
74 : _M_comp(__comp) {}
_Compare _M_comp
Definition: set_operations.h:76

Member Function Documentation

template<typename _IIter , typename _OutputIterator , typename _Compare >
_DifferenceType __gnu_parallel::__symmetric_difference_func< _IIter, _OutputIterator, _Compare >::__count ( _IIter  __a,
_IIter  __b,
_IIter  __c,
_IIter  __d 
) const
inline
107  {
108  _DifferenceType __counter = 0;
109 
110  while (__a != __b && __c != __d)
111  {
112  if (_M_comp(*__a, *__c))
113  {
114  ++__a;
115  ++__counter;
116  }
117  else if (_M_comp(*__c, *__a))
118  {
119  ++__c;
120  ++__counter;
121  }
122  else
123  {
124  ++__a;
125  ++__c;
126  }
127  }
128 
129  return __counter + (__b - __a) + (__d - __c);
130  }
_TraitsType::difference_type _DifferenceType
Definition: set_operations.h:71
_Compare _M_comp
Definition: set_operations.h:76
template<typename _IIter , typename _OutputIterator , typename _Compare >
_OutputIterator __gnu_parallel::__symmetric_difference_func< _IIter, _OutputIterator, _Compare >::__first_empty ( _IIter  __c,
_IIter  __d,
_OutputIterator  __out 
) const
inline
134  { return std::copy(__c, __d, __out); }
template<typename _IIter , typename _OutputIterator , typename _Compare >
_OutputIterator __gnu_parallel::__symmetric_difference_func< _IIter, _OutputIterator, _Compare >::__second_empty ( _IIter  __a,
_IIter  __b,
_OutputIterator  __out 
) const
inline
138  { return std::copy(__a, __b, __out); }
template<typename _IIter , typename _OutputIterator , typename _Compare >
_OutputIterator __gnu_parallel::__symmetric_difference_func< _IIter, _OutputIterator, _Compare >::_M_invoke ( _IIter  __a,
_IIter  __b,
_IIter  __c,
_IIter  __d,
_OutputIterator  __r 
) const
inline
81  {
82  while (__a != __b && __c != __d)
83  {
84  if (_M_comp(*__a, *__c))
85  {
86  *__r = *__a;
87  ++__a;
88  ++__r;
89  }
90  else if (_M_comp(*__c, *__a))
91  {
92  *__r = *__c;
93  ++__c;
94  ++__r;
95  }
96  else
97  {
98  ++__a;
99  ++__c;
100  }
101  }
102  return std::copy(__c, __d, std::copy(__a, __b, __r));
103  }
_Compare _M_comp
Definition: set_operations.h:76

Member Data Documentation

template<typename _IIter , typename _OutputIterator , typename _Compare >
_Compare __gnu_parallel::__symmetric_difference_func< _IIter, _OutputIterator, _Compare >::_M_comp

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