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::__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

 __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, _IIter, _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::__difference_func< _IIter, _OutputIterator, _Compare >::_DifferenceType
template<typename _IIter , typename _OutputIterator , typename _Compare >
typedef std::pair<_IIter, _IIter> __gnu_parallel::__difference_func< _IIter, _OutputIterator, _Compare >::_IteratorPair
template<typename _IIter , typename _OutputIterator , typename _Compare >
typedef std::iterator_traits<_IIter> __gnu_parallel::__difference_func< _IIter, _OutputIterator, _Compare >::_TraitsType

Constructor & Destructor Documentation

template<typename _IIter , typename _OutputIterator , typename _Compare >
__gnu_parallel::__difference_func< _IIter, _OutputIterator, _Compare >::__difference_func ( _Compare  __comp)
inline
151 : _M_comp(__comp) {}
_Compare _M_comp
Definition: set_operations.h:153

Member Function Documentation

template<typename _IIter , typename _OutputIterator , typename _Compare >
_DifferenceType __gnu_parallel::__difference_func< _IIter, _OutputIterator, _Compare >::__count ( _IIter  __a,
_IIter  __b,
_IIter  __c,
_IIter  __d 
) const
inline
181  {
182  _DifferenceType __counter = 0;
183 
184  while (__a != __b && __c != __d)
185  {
186  if (_M_comp(*__a, *__c))
187  {
188  ++__a;
189  ++__counter;
190  }
191  else if (_M_comp(*__c, *__a))
192  { ++__c; }
193  else
194  { ++__a; ++__c; }
195  }
196 
197  return __counter + (__b - __a);
198  }
_Compare _M_comp
Definition: set_operations.h:153
_TraitsType::difference_type _DifferenceType
Definition: set_operations.h:148
template<typename _IIter , typename _OutputIterator , typename _Compare >
_OutputIterator __gnu_parallel::__difference_func< _IIter, _OutputIterator, _Compare >::__first_empty ( _IIter  ,
_IIter  ,
_OutputIterator  __out 
) const
inline
202  { return __out; }
template<typename _IIter , typename _OutputIterator , typename _Compare >
_OutputIterator __gnu_parallel::__difference_func< _IIter, _OutputIterator, _Compare >::__second_empty ( _IIter  __a,
_IIter  __b,
_OutputIterator  __out 
) const
inline
206  { return std::copy(__a, __b, __out); }
template<typename _IIter , typename _OutputIterator , typename _Compare >
_OutputIterator __gnu_parallel::__difference_func< _IIter, _OutputIterator, _Compare >::_M_invoke ( _IIter  __a,
_IIter  __b,
_IIter  __c,
_IIter  __d,
_OutputIterator  __r 
) const
inline
158  {
159  while (__a != __b && __c != __d)
160  {
161  if (_M_comp(*__a, *__c))
162  {
163  *__r = *__a;
164  ++__a;
165  ++__r;
166  }
167  else if (_M_comp(*__c, *__a))
168  { ++__c; }
169  else
170  {
171  ++__a;
172  ++__c;
173  }
174  }
175  return std::copy(__a, __b, __r);
176  }
_Compare _M_comp
Definition: set_operations.h:153

Member Data Documentation

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

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