|
2271 | 2271 |
|
2272 | 2272 | \pnum
|
2273 | 2273 | \complexity
|
2274 |
| -At most |
2275 |
| -\tcode{(last - first) * log(last - first)} |
2276 |
| -swaps, but only linear number of swaps if there is enough extra memory. |
| 2274 | +At most $N \log(N)$ swaps, where $N = \tcode{last - first}$, |
| 2275 | +but only \bigoh{N} swaps if there is enough extra memory. |
2277 | 2276 | Exactly
|
2278 | 2277 | \tcode{last - first}
|
2279 | 2278 | applications of the predicate.
|
|
2324 | 2323 | \returns An iterator \tcode{mid} such that \tcode{all_of(first, mid, pred)} and \tcode{none_of(mid, last, pred)} are both true.
|
2325 | 2324 |
|
2326 | 2325 | \pnum
|
2327 |
| -\complexity \bigoh{log(last - first)} applications of \tcode{pred}. |
| 2326 | +\complexity \bigoh{\log(\tcode{last - first})} applications of \tcode{pred}. |
2328 | 2327 | \end{itemdescr}
|
2329 | 2328 |
|
2330 | 2329 |
|
|
2481 | 2480 |
|
2482 | 2481 | \pnum
|
2483 | 2482 | \complexity
|
2484 |
| -\bigoh{N\log(N)} |
2485 |
| -(where |
2486 |
| -\tcode{$N$ == last - first}) |
2487 |
| -comparisons. |
| 2483 | +\bigoh{N\log(N)} comparisons, where $N = \tcode{last - first}$. |
2488 | 2484 | \end{itemdescr}
|
2489 | 2485 |
|
2490 | 2486 | \rSec3[stable.sort]{\tcode{stable_sort}}
|
|
2515 | 2511 |
|
2516 | 2512 | \pnum
|
2517 | 2513 | \complexity
|
2518 |
| -It does at most $N \log^2(N)$ |
2519 |
| -(where |
2520 |
| -\tcode{$N$ == last - first}) |
2521 |
| -comparisons; if enough extra memory is available, it is |
2522 |
| -$N \log(N)$. |
| 2514 | +At most $N \log^2(N)$ |
| 2515 | +comparisons, where |
| 2516 | +$N = \tcode{last - first}$, but only $N \log(N)$ comparisons if there is enough extra memory. |
2523 | 2517 |
|
2524 | 2518 | \pnum
|
2525 | 2519 | \remarks Stable~(\ref{algorithm.stable}).
|
|
3045 | 3039 | \tcode{(last - first) - 1}
|
3046 | 3040 | comparisons.
|
3047 | 3041 | If no additional memory is available, an algorithm with complexity
|
3048 |
| -$N \log(N)$ |
3049 |
| -(where |
3050 |
| -\tcode{N} |
3051 |
| -is equal to |
3052 |
| -\tcode{last - first}) |
3053 |
| -may be used. |
| 3042 | +$N \log(N)$ may be used, where $N = \tcode{last - first}$. |
3054 | 3043 |
|
3055 | 3044 | \pnum
|
3056 | 3045 | \remarks Stable~(\ref{algorithm.stable}).
|
|
3381 | 3370 | \pnum
|
3382 | 3371 | \complexity
|
3383 | 3372 | At most
|
3384 |
| -\tcode{log(last - first)} |
| 3373 | +$\log(\tcode{last - first})$ |
3385 | 3374 | comparisons.
|
3386 | 3375 | \end{itemdescr}
|
3387 | 3376 |
|
|
3422 | 3411 | \pnum
|
3423 | 3412 | \complexity
|
3424 | 3413 | At most
|
3425 |
| -\tcode{2 * log(last - first)} |
| 3414 | +$2 \log(\tcode{last - first})$ |
3426 | 3415 | comparisons.
|
3427 | 3416 | \end{itemdescr}
|
3428 | 3417 |
|
|
3488 | 3477 | \pnum
|
3489 | 3478 | \complexity
|
3490 | 3479 | At most $N \log(N)$
|
3491 |
| -comparisons (where |
3492 |
| -\tcode{N == last - first}). |
| 3480 | +comparisons, where |
| 3481 | +$N = \tcode{last - first}$. |
3493 | 3482 | \end{itemdescr}
|
3494 | 3483 |
|
3495 | 3484 | \rSec3[is.heap]{\tcode{is_heap}}
|
|
0 commit comments