Namespace
Varianti

std::rotate_copy

Da cppreference.com.
< cpp‎ | algorithm

 
 
Algoritmo libreria
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Non modifica le operazioni di sequenza
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.
Modifica delle operazioni di sequenza
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.
Partizionamento operazioni
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.
Ordinamento delle operazioni (su intervalli ordinati)
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.
Binarie (le operazioni di ricerca sui campi ordinati)
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.
Impostare le operazioni (su intervalli ordinati)
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.
Heap operazioni
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.
Minimo / massimo le operazioni
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.
Operazioni numeriche
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.
Libreria C
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 gli elementi dal [first, last) gamma, ad un altro inizio intervallo su d_first in modo, che il n_first elemento diventa il primo elemento della nuova gamma e n_first - 1 diventa l'ultimo elemento.
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.

Indice

[modifica] Parametri

first, last -
dell'intervallo di elementi da copiare
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 -
l'elemento di spostare l'inizio della nuova gamma
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 -
all'inizio del campo di destinazione
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.

[modifica] Valore di ritorno

uscita iteratore all'elemento passato l'ultimo elemento copiato.
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.

[modifica] Possibile implementazione

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);
}

[modifica] Esempio

[modifica] Complessità

lineare la distanza tra 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.

[modifica] Vedi anche

ruota l'ordine degli elementi in un intervallo
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.

(funzione di modello) [edit]