Espaços nominais
Variantes
Acções

std::rotate_copy

Da cppreference.com
< cpp‎ | algorithm

 
 
Biblioteca algoritmo
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Não modificar operações de seqüência
Original:
Non-modifying sequence operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modificando operações de seqüência
Original:
Modifying sequence operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Particionamento operações
Original:
Partitioning operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operações de classificação (em intervalos ordenados)
Original:
Sorting operations (on sorted ranges)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Binários operações de busca (em intervalos ordenados)
Original:
Binary search operations (on sorted ranges)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definir operações (em intervalos ordenados)
Original:
Set operations (on sorted ranges)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operações de pilha
Original:
Heap operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Mínimo / máximo de operações
Original:
Minimum/maximum operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operações numéricas
Original:
Numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
C biblioteca
Original:
C library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Defined in header <algorithm>
template< class ForwardIt, class OutputIt >

OutputIt rotate_copy( ForwardIt first, ForwardIt n_first,

                      ForwardIt last, OutputIt d_first );
Copia os elementos da gama [first, last), para outro intervalo de início d_first de tal maneira, que o elemento n_first torna-se o primeiro elemento da nova gama e n_first - 1 torna-se o elemento anterior.
Original:
Copies the elements from the range [first, last), to another range beginning at d_first in such a way, that the element n_first becomes the first element of the new range and n_first - 1 becomes the last element.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Parâmetros

first, last -
a gama de elementos para copiar
Original:
the range of elements to copy
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
n_first -
o elemento para mover para o início do intervalo de novo
Original:
the element to move to the beginning of the new range
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
d_first -
início do intervalo de destino
Original:
beginning of the destination range
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Type requirements
-
ForwardIt must meet the requirements of ForwardIterator.
-
OutputIt must meet the requirements of OutputIterator.

[editar] Valor de retorno

iterador de saída para o elemento passado o último elemento copiado.
Original:
Output iterator to the element past the last element copied.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Possível implementação

template<class ForwardIt, class OutputIt>
OutputIt rotate_copy(ForwardIt first, ForwardIt n_first,
                           ForwardIt last, OutputIt d_first)
{
    d_first = std::copy(n_first, last, d_first);
    return std::copy(first, n_first, d_first);
}

[editar] Exemplo

[editar] Complexidade

linear, em que a distância entre first e last
Original:
linear in the distance between first and last
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Veja também

gira a ordem dos elementos em forma de intervalo
Original:
rotates the order of elements in a range
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]