hpx::ranges::adjacent_difference
hpx::ranges::adjacent_difference#
Defined in header hpx/algorithm.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
-
namespace ranges#
Functions
-
template<typename FwdIter1, typename FwdIter2, typename Sent>
FwdIter2 adjacent_difference(FwdIter1 first, Sent last, FwdIter2 dest)# Searches the range [first, last) for two consecutive identical elements.
Note
Complexity: Exactly the smaller of (result - first) + 1 and (last - first) - 1 application of the predicate where result is the value returned
- Template Parameters
FwdIter1 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
FwdIter2 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
Sent – The type of the source sentinel (deduced). This sentinel type must be a sentinel for InIter.
- Parameters
first – Refers to the beginning of the sequence of elements of the range the algorithm will be applied to.
last – Refers to the end of the sequence of elements of the range the algorithm will be applied to.
dest – Refers to the beginning of the destination range.
- Returns
The adjacent_difference algorithm returns an iterator to the first of the identical elements. If no such elements are found, last is returned.
-
template<typename Rng, typename FwdIter2>
FwdIter2 adjacent_difference(Rng &&rng, FwdIter2 dest)# Searches the rng for two consecutive identical elements.
Note
Complexity: Exactly the smaller of (result - first) + 1 and (last - first) - 1 application of the predicate where result is the value returned
- Template Parameters
FwdIter2 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
Rng – The type of the source range used (deduced). The iterators extracted from this range type must meet the requirements of an input iterator.
- Parameters
rng – Refers to the sequence of elements the algorithm will be applied to.
dest – Refers to the beginning of the destination range.
- Returns
The adjacent_difference algorithm returns an iterator to the first of the identical elements.
-
template<typename ExPolicy, typename FwdIter1, typename Sent, typename FwdIter2>
hpx::parallel::util::detail::algorithm_result_t<ExPolicy, FwdIter2> adjacent_difference(ExPolicy &&policy, FwdIter1 first, Sent last, FwdIter2 dest)# Searches the range [first, last) for two consecutive identical elements.
Note
Complexity: Exactly the smaller of (result - first) + 1 and (last - first) - 1 application of the predicate where result is the value returned
- Template Parameters
ExPolicy – The type of the execution policy to use (deduced). It describes the manner in which the execution of the algorithm may be parallelized and the manner in which it executes the assignments.
FwdIter1 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
FwdIter2 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
Sent – The type of the source sentinel (deduced). This sentinel type must be a sentinel for InIter.
- Parameters
policy – The execution policy to use for the scheduling of the iterations.
first – Refers to the beginning of the sequence of elements of the range the algorithm will be applied to.
last – Refers to the end of the sequence of elements of the range the algorithm will be applied to.
dest – Refers to the beginning of the destination range.
- Returns
The adjacent_difference algorithm returns an iterator to the first of the identical elements. If no such elements are found, last is returned.
-
template<typename ExPolicy, typename Rng, typename FwdIter2>
hpx::parallel::util::detail::algorithm_result_t<ExPolicy, FwdIter2> adjacent_difference(ExPolicy &&policy, Rng &&rng, FwdIter2 dest)# Searches the rng for two consecutive identical elements.
Note
Complexity: Exactly the smaller of (result - first) + 1 and (last - first) - 1 application of the predicate where result is the value returned
- Template Parameters
ExPolicy – The type of the execution policy to use (deduced). It describes the manner in which the execution of the algorithm may be parallelized and the manner in which it executes the assignments.
FwdIter2 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
Rng – The type of the source range used (deduced). The iterators extracted from this range type must meet the requirements of an input iterator.
- Parameters
policy – The execution policy to use for the scheduling of the iterations.
rng – Refers to the sequence of elements the algorithm will be applied to.
dest – Refers to the beginning of the destination range.
- Returns
The adjacent_difference algorithm returns an iterator to the first of the identical elements.
-
template<typename FwdIter1, typename Sent, typename FwdIter2, typename Op>
FwdIter2 adjacent_difference(FwdIter1 first, Sent last, FwdIter2 dest, Op &&op)# Searches the range [first, last) for two consecutive identical elements.
Note
Complexity: Exactly the smaller of (result - first) + 1 and (last - first) - 1 application of the predicate where result is the value returned
- Template Parameters
FwdIter1 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
FwdIter2 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
Sent – The type of the source sentinel (deduced). This sentinel type must be a sentinel for InIter.
Op – The type of the function/function object to use (deduced). Unlike its sequential form, the parallel overload of adjacent_difference requires Op to meet the requirements of CopyConstructible.
- Parameters
first – Refers to the beginning of the sequence of elements of the range the algorithm will be applied to.
last – Refers to the end of the sequence of elements of the range the algorithm will be applied to.
dest – Refers to the beginning of the destination range.
op – Binary operation function object that will be applied. The signature of the function should be equivalent to the following:
The signature does not need to have const &. The types Type1 and Type2 must be such that an object of type iterator_traits<InputIt>::value_type can be implicitly converted to both of them. The type Ret must be such that an object of type OutputIt can be dereferenced and assigned a value of type Ret.Ret fun(const Type1 &a, const Type2 &b);
- Returns
The adjacent_difference algorithm returns an iterator to the first of the identical elements. If no such elements are found, last is returned.
-
template<typename Rng, typename FwdIter2, typename Op>
FwdIter2 adjacent_difference(Rng &&rng, FwdIter2 dest, Op &&op)# Searches the rng for two consecutive identical elements.
- Template Parameters
FwdIter2 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
Rng – The type of the source range used (deduced). The iterators extracted from this range type must meet the requirements of an input iterator.
Op – The type of the function/function object to use (deduced). Unlike its sequential form, the parallel overload of adjacent_difference requires Op to meet the requirements of CopyConstructible.
- Parameters
rng – Refers to the sequence of elements the algorithm will be applied to.
dest – Refers to the beginning of the destination range.
op – Binary operation function object that will be applied. The signature of the function should be equivalent to the following:
The signature does not need to have const &. The types Type1 and Type2 must be such that an object of type iterator_traits<InputIt>::value_type can be implicitly converted to both of them. The type Ret must be such that an object of type OutputIt can be dereferenced and assigned a value of type Ret.?Ret fun(const Type1 &a, const Type2 &b);
- Returns
The adjacent_difference algorithm returns an iterator to the first of the identical elements.
-
template<typename ExPolicy, typename FwdIter1, typename Sent, typename FwdIter2, typename Op>
hpx::parallel::util::detail::algorithm_result_t<ExPolicy, FwdIter2> adjacent_difference(ExPolicy &&policy, FwdIter1 first, Sent last, FwdIter2 dest, Op &&op)# Searches the range [first, last) for two consecutive identical elements.
Note
Complexity: Exactly the smaller of (result - first) + 1 and (last - first) - 1 application of the predicate where result is the value returned
- Template Parameters
ExPolicy – The type of the execution policy to use (deduced). It describes the manner in which the execution of the algorithm may be parallelized and the manner in which it executes the assignments.
FwdIter1 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
FwdIter2 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
Sent – The type of the source sentinel (deduced). This sentinel type must be a sentinel for InIter.
Op – The type of the function/function object to use (deduced). Unlike its sequential form, the parallel overload of adjacent_difference requires Op to meet the requirements of CopyConstructible.
- Parameters
policy – The execution policy to use for the scheduling of the iterations.
first – Refers to the beginning of the sequence of elements of the range the algorithm will be applied to.
last – Refers to the end of the sequence of elements of the range the algorithm will be applied to.
dest – Refers to the beginning of the destination range.
op – Binary operation function object that will be applied. The signature of the function should be equivalent to the following:
The signature does not need to have const &. The types Type1 and Type2 must be such that an object of type iterator_traits<InputIt>::value_type can be implicitly converted to both of them. The type Ret must be such that an object of type OutputIt can be dereferenced and assigned a value of type Ret.?Ret fun(const Type1 &a, const Type2 &b);
- Returns
The adjacent_difference algorithm returns an iterator to the first of the identical elements. If no such elements are found, last is returned.
-
template<typename ExPolicy, typename Rng, typename FwdIter2, typename Op>
hpx::parallel::util::detail::algorithm_result_t<ExPolicy, FwdIter2> adjacent_difference(ExPolicy &&policy, Rng &&rng, FwdIter2 dest, Op &&op)# Searches the rng for two consecutive identical elements.
Note
Complexity: Exactly the smaller of (result - first) + 1 and (last - first) - 1 application of the predicate where result is the value returned
- Template Parameters
ExPolicy – The type of the execution policy to use (deduced). It describes the manner in which the execution of the algorithm may be parallelized and the manner in which it executes the assignments.
FwdIter2 – The type of the source iterators used for the range (deduced). This iterator type must meet the requirements of an forward iterator.
Rng – The type of the source range used (deduced). The iterators extracted from this range type must meet the requirements of an input iterator.
Op – The type of the function/function object to use (deduced). Unlike its sequential form, the parallel overload of adjacent_difference requires Op to meet the requirements of CopyConstructible.
- Parameters
policy – The execution policy to use for the scheduling of the iterations.
rng – Refers to the sequence of elements the algorithm will be applied to.
dest – Refers to the beginning of the destination range.
op – Binary operation function object that will be applied. The signature of the function should be equivalent to the following:
The signature does not need to have const &. The types Type1 and Type2 must be such that an object of type iterator_traits<InputIt>::value_type can be implicitly converted to both of them. The type Ret must be such that an object of type OutputIt can be dereferenced and assigned a value of type Ret.Ret fun(const Type1 &a, const Type2 &b);
- Returns
The adjacent_difference algorithm returns an iterator to the first of the identical elements.
-
template<typename FwdIter1, typename FwdIter2, typename Sent>
-
namespace ranges#