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

 __intersection_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, _IIter, _OutputIterator __out) const
 

Public Attributes

_Compare _M_comp
 

Member Typedef Documentation

template<typename _IIter , typename _OutputIterator , typename _Compare >
typedef _TraitsType::difference_type __gnu_parallel::__intersection_func< _IIter, _OutputIterator, _Compare >::_DifferenceType
template<typename _IIter , typename _OutputIterator , typename _Compare >
typedef std::pair<_IIter, _IIter> __gnu_parallel::__intersection_func< _IIter, _OutputIterator, _Compare >::_IteratorPair
template<typename _IIter , typename _OutputIterator , typename _Compare >
typedef std::iterator_traits<_IIter> __gnu_parallel::__intersection_func< _IIter, _OutputIterator, _Compare >::_TraitsType

Constructor & Destructor Documentation

template<typename _IIter , typename _OutputIterator , typename _Compare >
__gnu_parallel::__intersection_func< _IIter, _OutputIterator, _Compare >::__intersection_func ( _Compare  __comp)
inline
219 : _M_comp(__comp) {}
_Compare _M_comp
Definition: set_operations.h:221

Member Function Documentation

template<typename _IIter , typename _OutputIterator , typename _Compare >
_DifferenceType __gnu_parallel::__intersection_func< _IIter, _OutputIterator, _Compare >::__count ( _IIter  __a,
_IIter  __b,
_IIter  __c,
_IIter  __d 
) const
inline
247  {
248  _DifferenceType __counter = 0;
249 
250  while (__a != __b && __c != __d)
251  {
252  if (_M_comp(*__a, *__c))
253  { ++__a; }
254  else if (_M_comp(*__c, *__a))
255  { ++__c; }
256  else
257  {
258  ++__a;
259  ++__c;
260  ++__counter;
261  }
262  }
263 
264  return __counter;
265  }
_TraitsType::difference_type _DifferenceType
Definition: set_operations.h:216
_Compare _M_comp
Definition: set_operations.h:221
template<typename _IIter , typename _OutputIterator , typename _Compare >
_OutputIterator __gnu_parallel::__intersection_func< _IIter, _OutputIterator, _Compare >::__first_empty ( _IIter  ,
_IIter  ,
_OutputIterator  __out 
) const
inline
269  { return __out; }
template<typename _IIter , typename _OutputIterator , typename _Compare >
_OutputIterator __gnu_parallel::__intersection_func< _IIter, _OutputIterator, _Compare >::__second_empty ( _IIter  ,
_IIter  ,
_OutputIterator  __out 
) const
inline
273  { return __out; }
template<typename _IIter , typename _OutputIterator , typename _Compare >
_OutputIterator __gnu_parallel::__intersection_func< _IIter, _OutputIterator, _Compare >::_M_invoke ( _IIter  __a,
_IIter  __b,
_IIter  __c,
_IIter  __d,
_OutputIterator  __r 
) const
inline
226  {
227  while (__a != __b && __c != __d)
228  {
229  if (_M_comp(*__a, *__c))
230  { ++__a; }
231  else if (_M_comp(*__c, *__a))
232  { ++__c; }
233  else
234  {
235  *__r = *__a;
236  ++__a;
237  ++__c;
238  ++__r;
239  }
240  }
241 
242  return __r;
243  }
_Compare _M_comp
Definition: set_operations.h:221

Member Data Documentation

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

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