|
template<typename I > |
std::pair< I, I > | rotate (I f, I m, I l, std::bidirectional_iterator_tag) |
|
template<typename I > |
std::pair< I, I > | rotate (I f, I m, I l) |
|
A better algorithm than std::rotate because:
- It returns both m and m' in the order in which they show up in the sequence, allowing you to derive whether or not m is before or after m'.
◆ rotate() [1/2]
std::pair<I, I> adobe::rotate |
( |
I |
f, |
|
|
I |
m, |
|
|
I |
l, |
|
|
std::bidirectional_iterator_tag |
|
|
) |
| |
This is the bidirectional optimization for rotate.
Definition at line 39 of file rotate.hpp.
◆ rotate() [2/2]
std::pair<I, I> adobe::rotate |
( |
I |
f, |
|
|
I |
m, |
|
|
I |
l |
|
) |
| |
- Parameters
-
f | first item in the sequence |
m | the midpoint around which the range will be rotated |
l | one past the last item in the sequence |
- Returns
- m and m' as a pair in the order in which they appear in the range.
Definition at line 65 of file rotate.hpp.