diff --git a/source/algorithms.tex b/source/algorithms.tex index d723b7e11a..87a844a34c 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3647,7 +3647,7 @@ \pnum \complexity -Applies \tcode{f} exactly \tcode{last - first} times. +Applies \tcode{f} at most \tcode{last - first} times. \pnum \remarks @@ -3678,7 +3678,7 @@ \pnum \complexity -Applies \tcode{f} exactly \tcode{last - first} times. +Applies \tcode{f} at most \tcode{last - first} times. \pnum \remarks @@ -3723,7 +3723,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 @@ -4188,7 +4188,7 @@ \pnum \complexity For the overloads with no \tcode{ExecutionPolicy}, -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 overloads with an \tcode{ExecutionPolicy}, @@ -4262,7 +4262,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications +At most \tcode{last - first} applications of the corresponding predicate and any projection. \end{itemdescr} @@ -4536,7 +4536,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}. @@ -4586,7 +4586,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}; @@ -5072,7 +5072,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \indexlibraryglobal{copy}% @@ -5102,7 +5102,7 @@ \pnum \complexity -Exactly \tcode{last - first} assignments. +At most \tcode{last - first} assignments. \end{itemdescr} \indexlibraryglobal{copy_n}% @@ -5148,7 +5148,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \indexlibraryglobal{copy_if}% @@ -5218,7 +5218,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications +At most \tcode{last - first} applications of the corresponding predicate and any projection. \pnum @@ -5277,7 +5277,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \rSec2[alg.move]{Move} @@ -5335,7 +5335,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \indexlibrary{\idxcode{move}!algorithm}% @@ -5368,7 +5368,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \indexlibraryglobal{move_backward}% @@ -5430,7 +5430,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \rSec2[alg.swap]{Swap} @@ -5500,7 +5500,7 @@ \pnum \complexity -Exactly $M$ swaps. +At most $M$ swaps. \end{itemdescr} \indexlibraryglobal{iter_swap}% @@ -5642,7 +5642,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 overload with an \tcode{ExecutionPolicy}. @@ -5726,7 +5726,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications +At most \tcode{last - first} applications of the corresponding predicate and any projection. \end{itemdescr} @@ -5837,7 +5837,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications +At most \tcode{last - first} applications of the corresponding predicate and any projection. \end{itemdescr} @@ -5894,7 +5894,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \rSec2[alg.generate]{Generate} @@ -5948,7 +5948,7 @@ \pnum \complexity -Exactly $N$ evaluations of \tcode{gen()} and assignments. +At most $N$ evaluations of \tcode{gen()} and assignments. \end{itemdescr} \rSec2[alg.remove]{Remove} @@ -6024,7 +6024,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications +At most \tcode{last - first} applications of the corresponding predicate and any projection. \pnum @@ -6134,7 +6134,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications +At most \tcode{last - first} applications of the corresponding predicate and any projection. \pnum @@ -6209,7 +6209,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} @@ -6324,7 +6324,7 @@ \pnum \complexity -Exactly \tcode{last - first - 1} applications +At most \tcode{last - first - 1} applications of the corresponding predicate and no more than twice as many applications of any projection. \end{itemdescr} @@ -6367,7 +6367,7 @@ \pnum \complexity -Exactly \tcode{(last - first)/2} swaps. +At most \tcode{(last - first)/2} swaps. \end{itemdescr} \indexlibraryglobal{reverse_copy}% @@ -6419,7 +6419,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \rSec2[alg.rotate]{Rotate} @@ -6533,7 +6533,7 @@ \pnum \complexity -Exactly $N$ assignments. +At most $N$ assignments. \end{itemdescr} \begin{itemdecl} @@ -6680,7 +6680,7 @@ \pnum \complexity -Exactly \tcode{(last - first) - 1} swaps. +At most \tcode{(last - first) - 1} swaps. \pnum \remarks @@ -7759,7 +7759,7 @@ \begin{itemize} \item For the overload with no \tcode{ExecutionPolicy}, - 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 @@ -7835,7 +7835,7 @@ \item For the overloads with no \tcode{ExecutionPolicy}, 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 overload with an \tcode{ExecutionPolicy}, \bigoh{N \log N} swaps and \bigoh{N} applications of the predicate. @@ -7912,7 +7912,7 @@ \pnum \complexity -Exactly \tcode{last - first} applications of \tcode{pred} and \tcode{proj}. +At most \tcode{last - first} applications of \tcode{pred} and \tcode{proj}. \end{itemdescr} \indexlibraryglobal{partition_point}% @@ -8117,7 +8117,7 @@ \begin{itemize} \item For the overloads with no \tcode{ExecutionPolicy}, and - if enough additional memory is available, exactly $N - 1$ comparisons. + if enough additional memory is available, at most $N - 1$ comparisons. \item Otherwise, \bigoh{N \log N} comparisons. \end{itemize} @@ -8998,7 +8998,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 @@ -9041,7 +9041,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 @@ -9076,7 +9076,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 @@ -9119,7 +9119,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 @@ -9156,7 +9156,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 @@ -9256,7 +9256,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} @@ -9303,7 +9303,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} @@ -10334,7 +10334,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 @@ -10846,7 +10846,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 @@ -10881,7 +10881,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 e8afb21e09..6d5f5e238f 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -3044,7 +3044,7 @@ \pnum \complexity -Exactly $n \cdot \tcode{r}$ invocations +At most $n \cdot \tcode{r}$ invocations of \tcode{e}. \end{itemdescr} @@ -4371,7 +4371,7 @@ \pnum \complexity -Exactly $k$ invocations of \tcode{g} per attempt. +At most $k$ invocations of \tcode{g} per attempt. \pnum \begin{note}