tmp/tmpaabfkikz/{from.md → to.md}
RENAMED
|
@@ -26,15 +26,15 @@ template<class ForwardIterator, class T, class Compare>
|
|
| 26 |
|
| 27 |
*Requires:* The elements `e` of \[`first`, `last`) shall be partitioned
|
| 28 |
with respect to the expression `e < value` or `comp(e, value)`.
|
| 29 |
|
| 30 |
*Returns:* The furthermost iterator `i` in the range \[`first`, `last`\]
|
| 31 |
-
such that for
|
| 32 |
following corresponding conditions hold: `*j < value` or
|
| 33 |
`comp(*j, value) != false`.
|
| 34 |
|
| 35 |
-
*Complexity:* At most log₂(last - first) + 𝑂(1) comparisons.
|
| 36 |
|
| 37 |
#### `upper_bound` <a id="upper.bound">[[upper.bound]]</a>
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
template<class ForwardIterator, class T>
|
|
@@ -50,15 +50,15 @@ template<class ForwardIterator, class T, class Compare>
|
|
| 50 |
|
| 51 |
*Requires:* The elements `e` of \[`first`, `last`) shall be partitioned
|
| 52 |
with respect to the expression `!(value < e)` or `!comp(value, e)`.
|
| 53 |
|
| 54 |
*Returns:* The furthermost iterator `i` in the range \[`first`, `last`\]
|
| 55 |
-
such that for
|
| 56 |
following corresponding conditions hold: `!(value < *j)` or
|
| 57 |
`comp(value, *j) == false`.
|
| 58 |
|
| 59 |
-
*Complexity:* At most log₂(last - first) + 𝑂(1) comparisons.
|
| 60 |
|
| 61 |
#### `equal_range` <a id="equal.range">[[equal.range]]</a>
|
| 62 |
|
| 63 |
``` cpp
|
| 64 |
template<class ForwardIterator, class T>
|
|
@@ -91,11 +91,11 @@ or
|
|
| 91 |
``` cpp
|
| 92 |
make_pair(lower_bound(first, last, value, comp),
|
| 93 |
upper_bound(first, last, value, comp))
|
| 94 |
```
|
| 95 |
|
| 96 |
-
*Complexity:* At most 2 * log₂(last - first) + 𝑂(1) comparisons.
|
| 97 |
|
| 98 |
#### `binary_search` <a id="binary.search">[[binary.search]]</a>
|
| 99 |
|
| 100 |
``` cpp
|
| 101 |
template<class ForwardIterator, class T>
|
|
@@ -116,7 +116,7 @@ implies `!comp(value, e)`.
|
|
| 116 |
*Returns:* `true` if there is an iterator `i` in the range \[`first`,
|
| 117 |
`last`) that satisfies the corresponding conditions:
|
| 118 |
`!(*i < value) && !(value < *i)` or
|
| 119 |
`comp(*i, value) == false && comp(value, *i) == false`.
|
| 120 |
|
| 121 |
-
*Complexity:* At most
|
| 122 |
|
|
|
|
| 26 |
|
| 27 |
*Requires:* The elements `e` of \[`first`, `last`) shall be partitioned
|
| 28 |
with respect to the expression `e < value` or `comp(e, value)`.
|
| 29 |
|
| 30 |
*Returns:* The furthermost iterator `i` in the range \[`first`, `last`\]
|
| 31 |
+
such that for every iterator `j` in the range \[`first`, `i`) the
|
| 32 |
following corresponding conditions hold: `*j < value` or
|
| 33 |
`comp(*j, value) != false`.
|
| 34 |
|
| 35 |
+
*Complexity:* At most log₂(`last - first`) + 𝑂(1) comparisons.
|
| 36 |
|
| 37 |
#### `upper_bound` <a id="upper.bound">[[upper.bound]]</a>
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
template<class ForwardIterator, class T>
|
|
|
|
| 50 |
|
| 51 |
*Requires:* The elements `e` of \[`first`, `last`) shall be partitioned
|
| 52 |
with respect to the expression `!(value < e)` or `!comp(value, e)`.
|
| 53 |
|
| 54 |
*Returns:* The furthermost iterator `i` in the range \[`first`, `last`\]
|
| 55 |
+
such that for every iterator `j` in the range \[`first`, `i`) the
|
| 56 |
following corresponding conditions hold: `!(value < *j)` or
|
| 57 |
`comp(value, *j) == false`.
|
| 58 |
|
| 59 |
+
*Complexity:* At most log₂(`last - first`) + 𝑂(1) comparisons.
|
| 60 |
|
| 61 |
#### `equal_range` <a id="equal.range">[[equal.range]]</a>
|
| 62 |
|
| 63 |
``` cpp
|
| 64 |
template<class ForwardIterator, class T>
|
|
|
|
| 91 |
``` cpp
|
| 92 |
make_pair(lower_bound(first, last, value, comp),
|
| 93 |
upper_bound(first, last, value, comp))
|
| 94 |
```
|
| 95 |
|
| 96 |
+
*Complexity:* At most 2 * log₂(`last - first`) + 𝑂(1) comparisons.
|
| 97 |
|
| 98 |
#### `binary_search` <a id="binary.search">[[binary.search]]</a>
|
| 99 |
|
| 100 |
``` cpp
|
| 101 |
template<class ForwardIterator, class T>
|
|
|
|
| 116 |
*Returns:* `true` if there is an iterator `i` in the range \[`first`,
|
| 117 |
`last`) that satisfies the corresponding conditions:
|
| 118 |
`!(*i < value) && !(value < *i)` or
|
| 119 |
`comp(*i, value) == false && comp(value, *i) == false`.
|
| 120 |
|
| 121 |
+
*Complexity:* At most log₂(`last - first`) + 𝑂(1) comparisons.
|
| 122 |
|