- tmp/tmplenka30g/{from.md → to.md} +96 -121
tmp/tmplenka30g/{from.md → to.md}
RENAMED
|
@@ -1,243 +1,218 @@
|
|
| 1 |
-
##
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
// [accumulate], accumulate
|
| 6 |
template<class InputIterator, class T>
|
| 7 |
-
T accumulate(InputIterator first, InputIterator last, T init);
|
| 8 |
template<class InputIterator, class T, class BinaryOperation>
|
| 9 |
-
T accumulate(InputIterator first, InputIterator last, T init,
|
| 10 |
BinaryOperation binary_op);
|
| 11 |
|
| 12 |
// [reduce], reduce
|
| 13 |
template<class InputIterator>
|
| 14 |
-
typename iterator_traits<InputIterator>::value_type
|
| 15 |
reduce(InputIterator first, InputIterator last);
|
| 16 |
template<class InputIterator, class T>
|
| 17 |
-
T reduce(InputIterator first, InputIterator last, T init);
|
| 18 |
template<class InputIterator, class T, class BinaryOperation>
|
| 19 |
-
T reduce(InputIterator first, InputIterator last, T init,
|
| 20 |
BinaryOperation binary_op);
|
| 21 |
template<class ExecutionPolicy, class ForwardIterator>
|
| 22 |
typename iterator_traits<ForwardIterator>::value_type
|
| 23 |
reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 24 |
ForwardIterator first, ForwardIterator last);
|
| 25 |
template<class ExecutionPolicy, class ForwardIterator, class T>
|
| 26 |
T reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 27 |
ForwardIterator first, ForwardIterator last, T init);
|
| 28 |
template<class ExecutionPolicy, class ForwardIterator, class T, class BinaryOperation>
|
| 29 |
T reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 30 |
-
ForwardIterator first, ForwardIterator last, T init,
|
| 31 |
-
BinaryOperation binary_op);
|
| 32 |
|
| 33 |
// [inner.product], inner product
|
| 34 |
template<class InputIterator1, class InputIterator2, class T>
|
| 35 |
-
T inner_product(InputIterator1 first1, InputIterator1 last1,
|
| 36 |
InputIterator2 first2, T init);
|
| 37 |
template<class InputIterator1, class InputIterator2, class T,
|
| 38 |
class BinaryOperation1, class BinaryOperation2>
|
| 39 |
-
T inner_product(InputIterator1 first1, InputIterator1 last1,
|
| 40 |
InputIterator2 first2, T init,
|
| 41 |
-
|
| 42 |
-
BinaryOperation2 binary_op2);
|
| 43 |
|
| 44 |
// [transform.reduce], transform reduce
|
| 45 |
template<class InputIterator1, class InputIterator2, class T>
|
| 46 |
-
T transform_reduce(InputIterator1 first1, InputIterator1 last1,
|
| 47 |
-
|
| 48 |
-
T init);
|
| 49 |
template<class InputIterator1, class InputIterator2, class T,
|
| 50 |
class BinaryOperation1, class BinaryOperation2>
|
| 51 |
-
T transform_reduce(InputIterator1 first1, InputIterator1 last1,
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
BinaryOperation1 binary_op1,
|
| 55 |
-
BinaryOperation2 binary_op2);
|
| 56 |
template<class InputIterator, class T,
|
| 57 |
class BinaryOperation, class UnaryOperation>
|
| 58 |
-
T transform_reduce(InputIterator first, InputIterator last,
|
| 59 |
-
T init,
|
| 60 |
BinaryOperation binary_op, UnaryOperation unary_op);
|
| 61 |
template<class ExecutionPolicy,
|
| 62 |
class ForwardIterator1, class ForwardIterator2, class T>
|
| 63 |
T transform_reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 64 |
ForwardIterator1 first1, ForwardIterator1 last1,
|
| 65 |
-
ForwardIterator2 first2,
|
| 66 |
-
T init);
|
| 67 |
template<class ExecutionPolicy,
|
| 68 |
class ForwardIterator1, class ForwardIterator2, class T,
|
| 69 |
class BinaryOperation1, class BinaryOperation2>
|
| 70 |
T transform_reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 71 |
ForwardIterator1 first1, ForwardIterator1 last1,
|
| 72 |
-
ForwardIterator2 first2,
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
BinaryOperation2 binary_op2);
|
| 76 |
-
template<class ExecutionPolicy,
|
| 77 |
-
class ForwardIterator, class T,
|
| 78 |
class BinaryOperation, class UnaryOperation>
|
| 79 |
T transform_reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 80 |
-
ForwardIterator first, ForwardIterator last,
|
| 81 |
-
T init,
|
| 82 |
BinaryOperation binary_op, UnaryOperation unary_op);
|
| 83 |
|
| 84 |
// [partial.sum], partial sum
|
| 85 |
template<class InputIterator, class OutputIterator>
|
| 86 |
-
|
| 87 |
-
|
| 88 |
OutputIterator result);
|
| 89 |
template<class InputIterator, class OutputIterator, class BinaryOperation>
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
BinaryOperation binary_op);
|
| 94 |
|
| 95 |
// [exclusive.scan], exclusive scan
|
| 96 |
template<class InputIterator, class OutputIterator, class T>
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
template<class InputIterator, class OutputIterator, class T, class BinaryOperation>
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class T>
|
| 105 |
-
ForwardIterator2
|
|
|
|
| 106 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 107 |
-
|
| 108 |
-
T init);
|
| 109 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class T,
|
| 110 |
class BinaryOperation>
|
| 111 |
-
ForwardIterator2
|
|
|
|
| 112 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 113 |
-
|
| 114 |
-
T init, BinaryOperation binary_op);
|
| 115 |
|
| 116 |
// [inclusive.scan], inclusive scan
|
| 117 |
template<class InputIterator, class OutputIterator>
|
| 118 |
-
|
|
|
|
| 119 |
OutputIterator result);
|
| 120 |
template<class InputIterator, class OutputIterator, class BinaryOperation>
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
template<class InputIterator, class OutputIterator, class BinaryOperation, class T>
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2>
|
| 129 |
-
ForwardIterator2
|
|
|
|
| 130 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 131 |
ForwardIterator2 result);
|
| 132 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
| 133 |
class BinaryOperation>
|
| 134 |
-
ForwardIterator2
|
|
|
|
| 135 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 136 |
-
|
| 137 |
-
BinaryOperation binary_op);
|
| 138 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
| 139 |
class BinaryOperation, class T>
|
| 140 |
-
ForwardIterator2
|
|
|
|
| 141 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 142 |
-
|
| 143 |
-
BinaryOperation binary_op, T init);
|
| 144 |
|
| 145 |
// [transform.exclusive.scan], transform exclusive scan
|
| 146 |
template<class InputIterator, class OutputIterator, class T,
|
| 147 |
class BinaryOperation, class UnaryOperation>
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
template<class ExecutionPolicy,
|
| 154 |
-
class ForwardIterator1, class ForwardIterator2, class T,
|
| 155 |
class BinaryOperation, class UnaryOperation>
|
| 156 |
-
ForwardIterator2
|
|
|
|
| 157 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
BinaryOperation binary_op,
|
| 161 |
-
UnaryOperation unary_op);
|
| 162 |
|
| 163 |
// [transform.inclusive.scan], transform inclusive scan
|
| 164 |
template<class InputIterator, class OutputIterator,
|
| 165 |
class BinaryOperation, class UnaryOperation>
|
| 166 |
-
|
|
|
|
| 167 |
OutputIterator result,
|
| 168 |
-
|
| 169 |
-
UnaryOperation unary_op);
|
| 170 |
template<class InputIterator, class OutputIterator,
|
| 171 |
class BinaryOperation, class UnaryOperation, class T>
|
| 172 |
-
|
|
|
|
| 173 |
OutputIterator result,
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
T init);
|
| 177 |
-
template<class ExecutionPolicy,
|
| 178 |
-
class ForwardIterator1, class ForwardIterator2,
|
| 179 |
class BinaryOperation, class UnaryOperation>
|
| 180 |
-
ForwardIterator2
|
|
|
|
| 181 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 182 |
-
|
| 183 |
-
BinaryOperation binary_op,
|
| 184 |
UnaryOperation unary_op);
|
| 185 |
-
template<class ExecutionPolicy,
|
| 186 |
-
class ForwardIterator1, class ForwardIterator2,
|
| 187 |
class BinaryOperation, class UnaryOperation, class T>
|
| 188 |
-
ForwardIterator2
|
|
|
|
| 189 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 190 |
ForwardIterator2 result,
|
| 191 |
-
|
| 192 |
-
UnaryOperation unary_op,
|
| 193 |
-
T init);
|
| 194 |
|
| 195 |
// [adjacent.difference], adjacent difference
|
| 196 |
template<class InputIterator, class OutputIterator>
|
| 197 |
-
|
| 198 |
-
|
| 199 |
OutputIterator result);
|
| 200 |
template<class InputIterator, class OutputIterator, class BinaryOperation>
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
BinaryOperation binary_op);
|
| 205 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2>
|
| 206 |
-
ForwardIterator2
|
| 207 |
-
|
| 208 |
-
|
| 209 |
ForwardIterator2 result);
|
| 210 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
| 211 |
class BinaryOperation>
|
| 212 |
-
ForwardIterator2
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
BinaryOperation binary_op);
|
| 217 |
|
| 218 |
// [numeric.iota], iota
|
| 219 |
template<class ForwardIterator, class T>
|
| 220 |
-
void iota(ForwardIterator first, ForwardIterator last, T value);
|
| 221 |
|
| 222 |
// [numeric.ops.gcd], greatest common divisor
|
| 223 |
template<class M, class N>
|
| 224 |
constexpr common_type_t<M,N> gcd(M m, N n);
|
| 225 |
|
| 226 |
// [numeric.ops.lcm], least common multiple
|
| 227 |
template<class M, class N>
|
| 228 |
constexpr common_type_t<M,N> lcm(M m, N n);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
}
|
| 230 |
```
|
| 231 |
|
| 232 |
-
The requirements on the types of algorithms’ arguments that are
|
| 233 |
-
described in the introduction to Clause [[algorithms]] also apply to
|
| 234 |
-
the following algorithms.
|
| 235 |
-
|
| 236 |
-
Throughout this subclause, the parameters `UnaryOperation`,
|
| 237 |
-
`BinaryOperation`, `BinaryOperation1`, and `BinaryOperation2` are used
|
| 238 |
-
whenever an algorithm expects a function object ([[function.objects]]).
|
| 239 |
-
|
| 240 |
-
[*Note 1*: The use of closed ranges as well as semi-open ranges to
|
| 241 |
-
specify requirements throughout this subclause is
|
| 242 |
-
intentional. — *end note*]
|
| 243 |
-
|
|
|
|
| 1 |
+
## Header `<numeric>` synopsis <a id="numeric.ops.overview">[[numeric.ops.overview]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
// [accumulate], accumulate
|
| 6 |
template<class InputIterator, class T>
|
| 7 |
+
constexpr T accumulate(InputIterator first, InputIterator last, T init);
|
| 8 |
template<class InputIterator, class T, class BinaryOperation>
|
| 9 |
+
constexpr T accumulate(InputIterator first, InputIterator last, T init,
|
| 10 |
BinaryOperation binary_op);
|
| 11 |
|
| 12 |
// [reduce], reduce
|
| 13 |
template<class InputIterator>
|
| 14 |
+
constexpr typename iterator_traits<InputIterator>::value_type
|
| 15 |
reduce(InputIterator first, InputIterator last);
|
| 16 |
template<class InputIterator, class T>
|
| 17 |
+
constexpr T reduce(InputIterator first, InputIterator last, T init);
|
| 18 |
template<class InputIterator, class T, class BinaryOperation>
|
| 19 |
+
constexpr T reduce(InputIterator first, InputIterator last, T init,
|
| 20 |
BinaryOperation binary_op);
|
| 21 |
template<class ExecutionPolicy, class ForwardIterator>
|
| 22 |
typename iterator_traits<ForwardIterator>::value_type
|
| 23 |
reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 24 |
ForwardIterator first, ForwardIterator last);
|
| 25 |
template<class ExecutionPolicy, class ForwardIterator, class T>
|
| 26 |
T reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 27 |
ForwardIterator first, ForwardIterator last, T init);
|
| 28 |
template<class ExecutionPolicy, class ForwardIterator, class T, class BinaryOperation>
|
| 29 |
T reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 30 |
+
ForwardIterator first, ForwardIterator last, T init, BinaryOperation binary_op);
|
|
|
|
| 31 |
|
| 32 |
// [inner.product], inner product
|
| 33 |
template<class InputIterator1, class InputIterator2, class T>
|
| 34 |
+
constexpr T inner_product(InputIterator1 first1, InputIterator1 last1,
|
| 35 |
InputIterator2 first2, T init);
|
| 36 |
template<class InputIterator1, class InputIterator2, class T,
|
| 37 |
class BinaryOperation1, class BinaryOperation2>
|
| 38 |
+
constexpr T inner_product(InputIterator1 first1, InputIterator1 last1,
|
| 39 |
InputIterator2 first2, T init,
|
| 40 |
+
BinaryOperation1 binary_op1, BinaryOperation2 binary_op2);
|
|
|
|
| 41 |
|
| 42 |
// [transform.reduce], transform reduce
|
| 43 |
template<class InputIterator1, class InputIterator2, class T>
|
| 44 |
+
constexpr T transform_reduce(InputIterator1 first1, InputIterator1 last1,
|
| 45 |
+
InputIterator2 first2, T init);
|
|
|
|
| 46 |
template<class InputIterator1, class InputIterator2, class T,
|
| 47 |
class BinaryOperation1, class BinaryOperation2>
|
| 48 |
+
constexpr T transform_reduce(InputIterator1 first1, InputIterator1 last1,
|
| 49 |
+
InputIterator2 first2, T init,
|
| 50 |
+
BinaryOperation1 binary_op1, BinaryOperation2 binary_op2);
|
|
|
|
|
|
|
| 51 |
template<class InputIterator, class T,
|
| 52 |
class BinaryOperation, class UnaryOperation>
|
| 53 |
+
constexpr T transform_reduce(InputIterator first, InputIterator last, T init,
|
|
|
|
| 54 |
BinaryOperation binary_op, UnaryOperation unary_op);
|
| 55 |
template<class ExecutionPolicy,
|
| 56 |
class ForwardIterator1, class ForwardIterator2, class T>
|
| 57 |
T transform_reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 58 |
ForwardIterator1 first1, ForwardIterator1 last1,
|
| 59 |
+
ForwardIterator2 first2, T init);
|
|
|
|
| 60 |
template<class ExecutionPolicy,
|
| 61 |
class ForwardIterator1, class ForwardIterator2, class T,
|
| 62 |
class BinaryOperation1, class BinaryOperation2>
|
| 63 |
T transform_reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 64 |
ForwardIterator1 first1, ForwardIterator1 last1,
|
| 65 |
+
ForwardIterator2 first2, T init,
|
| 66 |
+
BinaryOperation1 binary_op1, BinaryOperation2 binary_op2);
|
| 67 |
+
template<class ExecutionPolicy, class ForwardIterator, class T,
|
|
|
|
|
|
|
|
|
|
| 68 |
class BinaryOperation, class UnaryOperation>
|
| 69 |
T transform_reduce(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 70 |
+
ForwardIterator first, ForwardIterator last, T init,
|
|
|
|
| 71 |
BinaryOperation binary_op, UnaryOperation unary_op);
|
| 72 |
|
| 73 |
// [partial.sum], partial sum
|
| 74 |
template<class InputIterator, class OutputIterator>
|
| 75 |
+
constexpr OutputIterator
|
| 76 |
+
partial_sum(InputIterator first, InputIterator last,
|
| 77 |
OutputIterator result);
|
| 78 |
template<class InputIterator, class OutputIterator, class BinaryOperation>
|
| 79 |
+
constexpr OutputIterator
|
| 80 |
+
partial_sum(InputIterator first, InputIterator last,
|
| 81 |
+
OutputIterator result, BinaryOperation binary_op);
|
|
|
|
| 82 |
|
| 83 |
// [exclusive.scan], exclusive scan
|
| 84 |
template<class InputIterator, class OutputIterator, class T>
|
| 85 |
+
constexpr OutputIterator
|
| 86 |
+
exclusive_scan(InputIterator first, InputIterator last,
|
| 87 |
+
OutputIterator result, T init);
|
| 88 |
template<class InputIterator, class OutputIterator, class T, class BinaryOperation>
|
| 89 |
+
constexpr OutputIterator
|
| 90 |
+
exclusive_scan(InputIterator first, InputIterator last,
|
| 91 |
+
OutputIterator result, T init, BinaryOperation binary_op);
|
| 92 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class T>
|
| 93 |
+
ForwardIterator2
|
| 94 |
+
exclusive_scan(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 95 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 96 |
+
ForwardIterator2 result, T init);
|
|
|
|
| 97 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class T,
|
| 98 |
class BinaryOperation>
|
| 99 |
+
ForwardIterator2
|
| 100 |
+
exclusive_scan(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 101 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 102 |
+
ForwardIterator2 result, T init, BinaryOperation binary_op);
|
|
|
|
| 103 |
|
| 104 |
// [inclusive.scan], inclusive scan
|
| 105 |
template<class InputIterator, class OutputIterator>
|
| 106 |
+
constexpr OutputIterator
|
| 107 |
+
inclusive_scan(InputIterator first, InputIterator last,
|
| 108 |
OutputIterator result);
|
| 109 |
template<class InputIterator, class OutputIterator, class BinaryOperation>
|
| 110 |
+
constexpr OutputIterator
|
| 111 |
+
inclusive_scan(InputIterator first, InputIterator last,
|
| 112 |
+
OutputIterator result, BinaryOperation binary_op);
|
| 113 |
template<class InputIterator, class OutputIterator, class BinaryOperation, class T>
|
| 114 |
+
constexpr OutputIterator
|
| 115 |
+
inclusive_scan(InputIterator first, InputIterator last,
|
| 116 |
+
OutputIterator result, BinaryOperation binary_op, T init);
|
| 117 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2>
|
| 118 |
+
ForwardIterator2
|
| 119 |
+
inclusive_scan(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 120 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 121 |
ForwardIterator2 result);
|
| 122 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
| 123 |
class BinaryOperation>
|
| 124 |
+
ForwardIterator2
|
| 125 |
+
inclusive_scan(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 126 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 127 |
+
ForwardIterator2 result, BinaryOperation binary_op);
|
|
|
|
| 128 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
| 129 |
class BinaryOperation, class T>
|
| 130 |
+
ForwardIterator2
|
| 131 |
+
inclusive_scan(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 132 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 133 |
+
ForwardIterator2 result, BinaryOperation binary_op, T init);
|
|
|
|
| 134 |
|
| 135 |
// [transform.exclusive.scan], transform exclusive scan
|
| 136 |
template<class InputIterator, class OutputIterator, class T,
|
| 137 |
class BinaryOperation, class UnaryOperation>
|
| 138 |
+
constexpr OutputIterator
|
| 139 |
+
transform_exclusive_scan(InputIterator first, InputIterator last,
|
| 140 |
+
OutputIterator result, T init,
|
| 141 |
+
BinaryOperation binary_op, UnaryOperation unary_op);
|
| 142 |
+
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class T,
|
|
|
|
|
|
|
| 143 |
class BinaryOperation, class UnaryOperation>
|
| 144 |
+
ForwardIterator2
|
| 145 |
+
transform_exclusive_scan(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 146 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 147 |
+
ForwardIterator2 result, T init,
|
| 148 |
+
BinaryOperation binary_op, UnaryOperation unary_op);
|
|
|
|
|
|
|
| 149 |
|
| 150 |
// [transform.inclusive.scan], transform inclusive scan
|
| 151 |
template<class InputIterator, class OutputIterator,
|
| 152 |
class BinaryOperation, class UnaryOperation>
|
| 153 |
+
constexpr OutputIterator
|
| 154 |
+
transform_inclusive_scan(InputIterator first, InputIterator last,
|
| 155 |
OutputIterator result,
|
| 156 |
+
BinaryOperation binary_op, UnaryOperation unary_op);
|
|
|
|
| 157 |
template<class InputIterator, class OutputIterator,
|
| 158 |
class BinaryOperation, class UnaryOperation, class T>
|
| 159 |
+
constexpr OutputIterator
|
| 160 |
+
transform_inclusive_scan(InputIterator first, InputIterator last,
|
| 161 |
OutputIterator result,
|
| 162 |
+
BinaryOperation binary_op, UnaryOperation unary_op, T init);
|
| 163 |
+
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
|
|
|
|
|
|
|
|
|
| 164 |
class BinaryOperation, class UnaryOperation>
|
| 165 |
+
ForwardIterator2
|
| 166 |
+
transform_inclusive_scan(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 167 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 168 |
+
ForwardIterator2 result, BinaryOperation binary_op,
|
|
|
|
| 169 |
UnaryOperation unary_op);
|
| 170 |
+
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
|
|
|
| 171 |
class BinaryOperation, class UnaryOperation, class T>
|
| 172 |
+
ForwardIterator2
|
| 173 |
+
transform_inclusive_scan(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 174 |
ForwardIterator1 first, ForwardIterator1 last,
|
| 175 |
ForwardIterator2 result,
|
| 176 |
+
BinaryOperation binary_op, UnaryOperation unary_op, T init);
|
|
|
|
|
|
|
| 177 |
|
| 178 |
// [adjacent.difference], adjacent difference
|
| 179 |
template<class InputIterator, class OutputIterator>
|
| 180 |
+
constexpr OutputIterator
|
| 181 |
+
adjacent_difference(InputIterator first, InputIterator last,
|
| 182 |
OutputIterator result);
|
| 183 |
template<class InputIterator, class OutputIterator, class BinaryOperation>
|
| 184 |
+
constexpr OutputIterator
|
| 185 |
+
adjacent_difference(InputIterator first, InputIterator last,
|
| 186 |
+
OutputIterator result, BinaryOperation binary_op);
|
|
|
|
| 187 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2>
|
| 188 |
+
ForwardIterator2
|
| 189 |
+
adjacent_difference(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 190 |
+
ForwardIterator1 first, ForwardIterator1 last,
|
| 191 |
ForwardIterator2 result);
|
| 192 |
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
| 193 |
class BinaryOperation>
|
| 194 |
+
ForwardIterator2
|
| 195 |
+
adjacent_difference(ExecutionPolicy&& exec, // see [algorithms.parallel.overloads]
|
| 196 |
+
ForwardIterator1 first, ForwardIterator1 last,
|
| 197 |
+
ForwardIterator2 result, BinaryOperation binary_op);
|
|
|
|
| 198 |
|
| 199 |
// [numeric.iota], iota
|
| 200 |
template<class ForwardIterator, class T>
|
| 201 |
+
constexpr void iota(ForwardIterator first, ForwardIterator last, T value);
|
| 202 |
|
| 203 |
// [numeric.ops.gcd], greatest common divisor
|
| 204 |
template<class M, class N>
|
| 205 |
constexpr common_type_t<M,N> gcd(M m, N n);
|
| 206 |
|
| 207 |
// [numeric.ops.lcm], least common multiple
|
| 208 |
template<class M, class N>
|
| 209 |
constexpr common_type_t<M,N> lcm(M m, N n);
|
| 210 |
+
|
| 211 |
+
// [numeric.ops.midpoint], midpoint
|
| 212 |
+
template<class T>
|
| 213 |
+
constexpr T midpoint(T a, T b) noexcept;
|
| 214 |
+
template<class T>
|
| 215 |
+
constexpr T* midpoint(T* a, T* b);
|
| 216 |
}
|
| 217 |
```
|
| 218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|