17 #ifndef STXXL_PARALLEL_BASE_HEADER
18 #define STXXL_PARALLEL_BASE_HEADER
34 template <
class Predicate,
typename first_argument_type,
typename second_argument_type>
36 :
public std::binary_function<first_argument_type, second_argument_type, bool>
45 bool operator () (
const first_argument_type& x,
46 const second_argument_type& y)
const
82 template <
class Comparator,
typename T1,
typename T2>
91 bool operator () (
const T1& a,
const T2& b)
94 return !comp(a, b) && !comp(b, a);
106 template <
typename RandomAccessIterator,
typename Comparator>
109 RandomAccessIterator c, Comparator& comp)
114 else if (comp(*a, *c))
121 else if (comp(*b, *c))
128 template <
typename T1,
typename T2>
129 struct equal_to : std::binary_function<T1, T2, bool>
131 bool operator () (
const T1& t1,
const T2& t2)
const
138 template <
typename T1,
typename T2>
139 struct less : std::binary_function<T1, T2, bool>
141 bool operator () (
const T1& t1,
const T2& t2)
const
151 #endif // !STXXL_PARALLEL_BASE_HEADER
RandomAccessIterator median_of_three_iterators(RandomAccessIterator a, RandomAccessIterator b, RandomAccessIterator c, Comparator &comp)
Compute the median of three referenced elements, according to comp.
Alternative to std::not2, typedefs first_argument_type and second_argument_type not needed...
#define STXXL_BEGIN_NAMESPACE
static lcas_t encode2(int a, int b)
Encode two integers into one mcstl::lcas_t.
static const lcas_t lcas_t_mask
static const size_t lcas_t_bits
equal_from_less(Comparator &_comp)
Constructs predicate for equality from strict weak ordering predicate.
binary_negate(const Predicate &_pred)
static void decode2(lcas_t x, int &a, int &b)
Decode two integers from one mcstl::lcas_t.
#define STXXL_END_NAMESPACE