stlab.adobe.com Adobe Systems Incorporated

Functions

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)

Detailed Description

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'.

Function Documentation

std::pair<I, I> adobe::rotate ( f,
m,
l,
std::bidirectional_iterator_tag   
)

This is the bidirectional optimization for rotate.

Definition at line 39 of file rotate.hpp.

std::pair<I, I> adobe::rotate ( f,
m,
l 
)
Parameters:
ffirst item in the sequence
mthe midpoint around which the range will be rotated
lone 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.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google