Skip to content

Commit

Permalink
shift_left/shift_rightの事前条件に合わせて戻り値の記述も更新
Browse files Browse the repository at this point in the history
  • Loading branch information
tshino committed Mar 13, 2023
1 parent 58c137d commit 68eb5ba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 2 additions & 3 deletions reference/algorithm/ranges_shift_left.md
Expand Up @@ -54,9 +54,8 @@ namespace std::ranges {
## 戻り値
`new_last`を次のように定義する。
- `n > 0`かつ`n < last - first`である場合、`first + (last - first - n)`を返す
- `n > 0`である場合、`first`を返す
- いずれでもない場合、`last`を返す
- `n < last - first`である場合、`first + (last - first - n)`
- そうでなければ、`first`
このとき、 `{first, new_last}`
Expand Down
5 changes: 2 additions & 3 deletions reference/algorithm/ranges_shift_right.md
Expand Up @@ -55,9 +55,8 @@ namespace std::ranges {
## 戻り値
`new_first`を次のように定義する。
- `n > 0`かつ`n < last - first`である場合、`first + n`を返す
- `n > 0`である場合、`last`を返す
- いずれでもない場合、`first`を返す
- `n < last - first`である場合、`first + n`
- そうでなければ、`last`
このとき、 `{new_first, last}`
Expand Down
5 changes: 2 additions & 3 deletions reference/algorithm/shift_left.md
Expand Up @@ -46,9 +46,8 @@ namespace std {
## 戻り値
- `n > 0`かつ`n < last - first`である場合、`first + (last - first - n)`を返す
- `n > 0`である場合、`first`を返す
- いずれでもない場合、`last`を返す
- `n < last - first`である場合、`first + (last - first - n)`を返す
- そうでなければ、`first`を返す
## 計算量
Expand Down
5 changes: 2 additions & 3 deletions reference/algorithm/shift_right.md
Expand Up @@ -47,9 +47,8 @@ namespace std {
## 戻り値
- `n > 0`かつ`n < last - first`である場合、`first + n`を返す
- `n > 0`である場合、`last`を返す
- いずれでもない場合、`first`を返す
- `n < last - first`である場合、`first + n`を返す
- そうでなければ、`last`を返す
## 計算量
Expand Down

0 comments on commit 68eb5ba

Please sign in to comment.