diff --git a/source/algorithms.tex b/source/algorithms.tex index f4e3bec376..1d29b49fe0 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -4640,7 +4640,7 @@ \pnum \complexity -Applies \tcode{f} exactly \tcode{last - first} times. +Applies \tcode{f} at most \tcode{last - first} times. \pnum \remarks @@ -4671,7 +4671,7 @@ \pnum \complexity -Applies \tcode{f} exactly \tcode{last - first} times. +Applies \tcode{f} at most \tcode{last - first} times. \pnum \remarks @@ -4716,7 +4716,7 @@ \pnum \complexity -Applies \tcode{f} and \tcode{proj} exactly \tcode{last - first} times. +Applies \tcode{f} and \tcode{proj} at most \tcode{last - first} times. \pnum \remarks @@ -5368,7 +5368,7 @@ \pnum \complexity For the non-parallel algorithm overloads, -exactly \[ \min(\tcode{(i - first) + 1}, \ \tcode{(last - first) - 1}) \] +at most \[ \min(\tcode{(i - first) + 1}, \ \tcode{(last - first) - 1}) \] applications of the corresponding predicate, where \tcode{i} is \tcode{adjacent_find}'s return value. For the parallel algorithm overloads, @@ -5463,7 +5463,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications +At most \tcode{last - first} applications of the corresponding predicate and any projection. \end{itemdescr} @@ -5755,7 +5755,7 @@ if \tcode{ForwardIterator1} and \tcode{Forward\-Iter\-ator2} meet the requirements of random access iterators and \tcode{last1 - first1 != last2 - first2}. -Otherwise, exactly \tcode{last1 - first1} applications +Otherwise, at most \tcode{last1 - first1} applications of the corresponding predicate if \tcode{equal(first1, last1, first2, last2, pred)} would return \tcode{true}; otherwise, at worst \bigoh{N^2}, where $N$ has the value \tcode{last1 - first1}. @@ -5805,7 +5805,7 @@ \tcode{R1} and \tcode{R2} each model \libconcept{sized_range}, and \tcode{ranges::distance(r1) != ranges::distance(r2)}. \end{itemize} -Otherwise, exactly \tcode{last1 - first1} applications +Otherwise, at most \tcode{last1 - first1} applications of the corresponding predicate and projections if \tcode{ranges::equal(\brk{}first1, last1, first2, last2, pred, proj1, proj2)} would return \tcode{true}; @@ -6390,7 +6390,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \indexlibraryglobal{copy}% @@ -6442,7 +6442,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \indexlibraryglobal{copy_n}% @@ -6501,7 +6501,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \indexlibraryglobal{copy_if}% @@ -6666,7 +6666,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \rSec2[alg.move]{Move} @@ -6724,7 +6724,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \indexlibrary{\idxcode{move}!algorithm}% @@ -6789,7 +6789,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \indexlibraryglobal{move_backward}% @@ -6851,7 +6851,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \rSec2[alg.swap]{Swap} @@ -6932,7 +6932,7 @@ \pnum \complexity -Exactly $M$ swaps. +At most $M$ swaps. \end{itemdescr} \indexlibraryglobal{iter_swap}% @@ -7119,7 +7119,7 @@ \pnum \complexity -Exactly $N$ applications of \tcode{op} or \tcode{binary_op}, and +At most $N$ applications of \tcode{op} or \tcode{binary_op}, and any projections. This requirement also applies to the parallel algorithm overloads. @@ -7231,7 +7231,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications +At most \tcode{last - first} applications of the corresponding predicate and any projection. \end{itemdescr} @@ -7389,7 +7389,7 @@ \pnum \complexity -Exactly $N$ applications +At most $N$ applications of the corresponding predicate and any projection. \end{itemdescr} @@ -7457,7 +7457,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \rSec2[alg.generate]{Generate} @@ -7522,7 +7522,7 @@ \pnum \complexity -Exactly $N$ evaluations of \tcode{gen()} and assignments. +At most $N$ evaluations of \tcode{gen()} and assignments. \pnum \remarks @@ -7627,7 +7627,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications +At most \tcode{last - first} applications of the corresponding predicate and any projection. \pnum @@ -7878,7 +7878,7 @@ \pnum \complexity -For nonempty ranges, exactly \tcode{(last - first) - 1} applications +For nonempty ranges, at most \tcode{(last - first) - 1} applications of the corresponding predicate and no more than twice as many applications of any projection. \end{itemdescr} @@ -8086,7 +8086,7 @@ \pnum \complexity -Exactly \tcode{(last - first)/2} swaps. +At most \tcode{(last - first)/2} swaps. \end{itemdescr} \indexlibraryglobal{reverse_copy}% @@ -8138,7 +8138,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \begin{itemdecl} @@ -8178,7 +8178,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \rSec2[alg.rotate]{Rotate} @@ -8310,7 +8310,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \begin{itemdecl} @@ -8354,7 +8354,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \begin{itemdecl} @@ -8518,7 +8518,7 @@ \pnum \complexity -Exactly \tcode{(last - first) - 1} swaps. +At most \tcode{(last - first) - 1} swaps. \pnum \remarks @@ -9742,7 +9742,7 @@ \begin{itemize} \item For the non-parallel algorithm overloads, - exactly $N$ applications of the predicate and projection. + at most $N$ applications of the predicate and projection. At most $N / 2$ swaps if the type of \tcode{first} meets the \oldconcept{BidirectionalIterator} requirements for the overloads in namespace \tcode{std} or @@ -9830,7 +9830,7 @@ For the non-parallel algorithm overloads, at most $N \log_2 N$ swaps, but only \bigoh{N} swaps if there is enough extra memory. - Exactly $N$ applications of the predicate and projection. + At most $N$ applications of the predicate and projection. \item For the parallel algorithm overloads, \bigoh{N \log N} swaps and \bigoh{N} applications of the predicate. @@ -11307,7 +11307,7 @@ \pnum \complexity -Exactly one comparison and two applications of the projection, if any. +At most one comparison and two applications of the projection, if any. \pnum \remarks @@ -11355,7 +11355,7 @@ \pnum \complexity -Exactly \tcode{ranges::distance(r) - 1} comparisons +At most \tcode{ranges::distance(r) - 1} comparisons and twice as many applications of the projection, if any. \pnum @@ -11390,7 +11390,7 @@ \pnum \complexity -Exactly one comparison and two applications of the projection, if any. +At most one comparison and two applications of the projection, if any. \pnum \remarks @@ -11438,7 +11438,7 @@ \pnum \complexity -Exactly \tcode{ranges::distance(r) - 1} comparisons +At most \tcode{ranges::distance(r) - 1} comparisons and twice as many applications of the projection, if any. \pnum @@ -11475,7 +11475,7 @@ \pnum \complexity -Exactly one comparison and two applications of the projection, if any. +At most one comparison and two applications of the projection, if any. \pnum \remarks @@ -11590,7 +11590,7 @@ \pnum \complexity -Exactly $\max(\tcode{last - first - 1}, 0)$ comparisons and +At most $\max(\tcode{last - first - 1}, 0)$ comparisons and twice as many projections. \end{itemdescr} @@ -11647,7 +11647,7 @@ \pnum \complexity -Exactly $\max(\tcode{last - first - 1}, 0)$ comparisons and +At most $\max(\tcode{last - first - 1}, 0)$ comparisons and twice as many projections. \end{itemdescr} @@ -12703,7 +12703,7 @@ \pnum \complexity -Exactly \tcode{(last - first) - 1} applications of the binary operation. +At most \tcode{(last - first) - 1} applications of the binary operation. \pnum \remarks @@ -13215,7 +13215,7 @@ \pnum \complexity -Exactly \tcode{(last - first) - 1} applications of the binary operation. +At most \tcode{(last - first) - 1} applications of the binary operation. \pnum \remarks @@ -13250,7 +13250,7 @@ \pnum \complexity -Exactly \tcode{last - first} increments and assignments. +At most \tcode{last - first} increments and assignments. \end{itemdescr} \indexlibraryglobal{iota}% diff --git a/source/numerics.tex b/source/numerics.tex index da32b9a221..ac148e8100 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -3122,7 +3122,7 @@ \pnum \complexity -Exactly $n \cdot \tcode{r}$ invocations +At most $n \cdot \tcode{r}$ invocations of \tcode{e}. \end{itemdescr} @@ -4447,7 +4447,7 @@ \pnum \complexity -Exactly $k$ invocations of \tcode{g} per attempt. +At most $k$ invocations of \tcode{g} per attempt. \pnum \begin{note}