Skip to content

Commit 72b80b3

Browse files
committed
[alg.partition] Use established terminology 'partitioned with respect to'
1 parent b4a1e3c commit 72b80b3

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

source/algorithms.tex

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4257,7 +4257,9 @@
42574257
\pnum
42584258
\returns \tcode{true} if
42594259
\range{first}{last} is empty or if
4260-
\range{first}{last} is partitioned by \tcode{pred}, i.e. if all elements that satisfy \tcode{pred} appear before those that do not.
4260+
the elements \tcode{e} of
4261+
\range{first}{last} are partitioned with respect to the expression
4262+
\tcode{pred(e)}.
42614263

42624264
\pnum
42634265
\complexity Linear. At most \tcode{last - first} applications of \tcode{pred}.
@@ -4304,13 +4306,11 @@
43044306
\begin{itemdecl}
43054307
template<class BidirectionalIterator, class Predicate>
43064308
BidirectionalIterator
4307-
stable_partition(BidirectionalIterator first, BidirectionalIterator last,
4308-
Predicate pred);
4309+
stable_partition(BidirectionalIterator first, BidirectionalIterator last, Predicate pred);
43094310
template<class ExecutionPolicy, class BidirectionalIterator, class Predicate>
43104311
BidirectionalIterator
43114312
stable_partition(ExecutionPolicy&& exec,
4312-
BidirectionalIterator first, BidirectionalIterator last,
4313-
Predicate pred);
4313+
BidirectionalIterator first, BidirectionalIterator last, Predicate pred);
43144314
\end{itemdecl}
43154315

43164316
\begin{itemdescr}
@@ -4364,18 +4364,15 @@
43644364
class OutputIterator2, class Predicate>
43654365
constexpr pair<OutputIterator1, OutputIterator2>
43664366
partition_copy(InputIterator first, InputIterator last,
4367-
OutputIterator1 out_true, OutputIterator2 out_false,
4368-
Predicate pred);
4367+
OutputIterator1 out_true, OutputIterator2 out_false, Predicate pred);
43694368
template<class ExecutionPolicy, class ForwardIterator, class ForwardIterator1,
43704369
class ForwardIterator2, class Predicate>
43714370
pair<ForwardIterator1, ForwardIterator2>
43724371
partition_copy(ExecutionPolicy&& exec,
43734372
ForwardIterator first, ForwardIterator last,
4374-
ForwardIterator1 out_true, ForwardIterator2 out_false,
4375-
Predicate pred);
4373+
ForwardIterator1 out_true, ForwardIterator2 out_false, Predicate pred);
43764374
\end{itemdecl}
43774375

4378-
43794376
\begin{itemdescr}
43804377
\pnum
43814378
\requires
@@ -4415,14 +4412,15 @@
44154412
\begin{itemdecl}
44164413
template<class ForwardIterator, class Predicate>
44174414
constexpr ForwardIterator
4418-
partition_point(ForwardIterator first, ForwardIterator last,
4419-
Predicate pred);
4415+
partition_point(ForwardIterator first, ForwardIterator last, Predicate pred);
44204416
\end{itemdecl}
44214417

4422-
44234418
\begin{itemdescr}
44244419
\pnum
4425-
\requires \tcode{ForwardIterator}'s value type shall be convertible to \tcode{Predicate}'s argument type. \range{first}{last} shall be partitioned by \tcode{pred}, i.e. all elements that satisfy \tcode{pred} shall appear before those that do not.
4420+
\requires
4421+
\tcode{ForwardIterator}'s value type shall be convertible to
4422+
\tcode{Predicate}'s argument type. The elements \tcode{e} of \range{first}{last}
4423+
shall be partitioned with respect to the expression \tcode{pred(e)}.
44264424

44274425
\pnum
44284426
\returns An iterator \tcode{mid} such that \tcode{all_of(first, mid, pred)} and \tcode{none_of(mid, last, pred)} are both \tcode{true}.

0 commit comments

Comments
 (0)