Algorithms library
De cppreference.com
< cpp
[] |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
A biblioteca de algoritmos define funes para uma variedade de fins (por exemplo, a pesquisa, triagem, a contagem, a manipulao) que operam em intervalos de elementos. Note-se que um intervalo definido como
[first, last) onde last refere-se ao elemento passado' o ltimo elemento de controlar ou modificar.Original:
The algorithms library defines functions for a variety of purposes (e.g. searching, sorting, counting, manipulating) that operate on ranges of elements. Note that a range is defined as
[first, last) where last refers to the element past the last element to inspect or modify.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
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. | |
Defined in header
<algorithm> | |
(C++11) (C++11) (C++11) |
Verifica se um predicado true de tudo, qualquer ou nenhum dos elementos em forma de intervalo Original: checks if a predicate is true for all, any or none of the 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 funo) |
aplica-se uma funo de uma srie de elementos Original: applies a function to a range of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
devolve o nmero de elementos que satisfaam critrios especficos Original: returns the number of elements satisfying specific criteria The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
encontra a primeira posio em que dois intervalos diferentes Original: finds the first position where two ranges differ The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
determina se dois conjuntos de elementos so os mesmos Original: determines if two sets of elements are the same The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
(C++11) |
encontra o primeiro elemento satisfazer critrios especficos Original: finds the first element satisfying specific criteria The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
encontra a ltima sequncia de elementos em um determinado intervalo Original: finds the last sequence of elements in a certain 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 funo) | |
| searches for any one of a set of elements (modelo de funo) | |
encontra dois idnticos (ou algum outro relacionamento) itens adjacentes uns aos outros Original: finds two identical (or some other relationship) items adjacent to each other The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
| searches for a range of elements (modelo de funo) | |
Procura por um nmero de cpias consecutivos de um elemento em uma faixa Original: searches for a number consecutive copies of an element 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 funo) | |
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. | |
Defined in header
<algorithm> | |
(C++11) |
Copia um intervalo de elementos para um novo local Original: copies a range of elements to a new location The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
(C++11) |
copia um nmero de elementos para um novo local Original: copies a number of elements to a new location The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
cpias. uma srie de elementos a fim de trs Original: copies a range of elements in backwards order The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
(C++11) |
move-se de uma srie de elementos para uma nova localizao Original: moves a range of elements to a new location The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
(C++11) |
move uma srie de elementos para uma nova localizao para trs Original: moves a range of elements to a new location in backwards order The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
atribui um intervalo de elementos de um certo valor Original: assigns a range of elements a certain value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
atribui um valor a um certo nmero de elementos Original: assigns a value to a number of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
aplica-se uma funo de uma srie de elementos Original: applies a function to a range of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
guarda o resultado de uma funo em um intervalo Original: saves the result of a function 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 funo) | |
guarda o resultado de aplicaes de N de uma funo Original: saves the result of N applications of a function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
remove elementos que satisfazem critrios especficos Original: removes elements satisfying specific criteria The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
Copia um intervalo de elementos omitindo aqueles que satisfazem critrios especficos Original: copies a range of elements omitting those that satisfy specific criteria The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
substitui todos os valores que satisfaam os critrios especficos, com outro valor Original: replaces all values satisfying specific criteria with another value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
copia um intervalo, substituindo elementos que satisfazem critrios especficos com outro valor Original: copies a range, replacing elements satisfying specific criteria with another value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
troca os valores dos dois objetos Original: swaps the values of two objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
troca dois intervalos de elementos Original: swaps two ranges of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
troca os elementos apontado por dois iteradores Original: swaps the elements pointed to by two iterators The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
inverte os elementos de ordem em um intervalo Original: reverses the order 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 funo) | |
cria uma cpia de um intervalo que invertida Original: creates a copy of a range that is reversed The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
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 funo) | |
cpias e rodar uma srie de elementos Original: copies and rotate a range of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
(C++11) |
aleatoriamente novos pedidos elementos em um intervalo Original: randomly re-orders 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 funo) |
| removes consecutive duplicate elements in a range (modelo de funo) | |
cria uma cpia de alguma gama de elementos que no contm duplicatas consecutivo Original: creates a copy of some range of elements that contains no consecutive duplicates The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
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. | |
(C++11) |
determina se o intervalo dividido pelo predicado dado Original: determines if the range is partitioned by the given predicate The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
divide um intervalo de elementos em dois grupos Original: divides a range of elements into two groups The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
(C++11) |
copies a range dividing the elements into two groups (modelo de funo) |
divide os elementos em dois grupos, preservando sua ordem relativa Original: divides elements into two groups while preserving their relative order The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
(C++11) |
locates the partition point of a partitioned range (modelo de funo) |
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. | |
Defined in header
<algorithm> | |
(C++11) |
Verifica se uma faixa classificada em ordem crescente Original: checks whether a range is sorted into ascending order The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
(C++11) |
localiza o maior subrange classificados Original: finds the largest sorted subrange The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
tipo um intervalo em ordem crescente Original: sorts a range into ascending order The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
classifica os elementos N primeiros de uma srie Original: sorts the first N elements of 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 funo) | |
cpias e parcialmente Classifica um intervalo de elementos Original: copies and partially sorts a range of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
Classifica um intervalo de elementos preservando ordem entre elementos iguais Original: sorts a range of elements while preserving order between equal elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
parcialmente classifica o intervalo dado certificando-se que dividido pelo elemento dado Original: partially sorts the given range making sure that it is partitioned by the given element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
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. | |
Defined in header
<algorithm> | |
retorna um iterador para o primeiro elemento no menos do que o valor dado Original: returns an iterator to the first element not less than the given value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
retorna um iterador para o primeiro elemento' maior do que um determinado valor Original: returns an iterator to the first element greater than a certain value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
determina se existe um elemento de um determinado intervalo Original: determines if an element exists in a certain 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 funo) | |
retorna a escala de elementos que combinam com uma tecla especfica Original: returns range of elements matching a specific key The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
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. | |
Defined in header
<algorithm> | |
funde duas faixas de classificados Original: merges two sorted ranges The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
funde duas faixas encomendadas no local Original: merges two ordered ranges in-place The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
devolve verdadeiro se um conjunto um subconjunto de uma outra Original: returns true if one set is a subset of another The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
calcula a diferena entre os dois conjuntos Original: computes the difference between two sets The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
calcula a interseo de dois conjuntos Original: computes the intersection of two sets The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
calcula a diferena entre os dois conjuntos simtricos Original: computes the symmetric difference between two sets The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
| computes the union of two sets (modelo de funo) | |
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. | |
Defined in header
<algorithm> | |
| checks if the given range is a heap (modelo de funo) | |
(C++11) |
encontra o maior subrange que heap Original: finds the largest subrange that is heap The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
cria uma pilha a partir de uma srie de elementos Original: creates a heap out of a range of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
acrescenta um elemento a um heap Original: adds an element to a heap The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
remove o maior elemento de um heap Original: removes the largest element from a heap The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
vira um heap em um intervalo classificado de elementos Original: turns a heap into a sorted range of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
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. | |
Defined in header
<algorithm> | |
devolve o maior dos dois elementos Original: returns the larger of two elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
retorna o maior elemento de um intervalo Original: returns the largest element 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 funo) | |
retorna o menor dos dois elementos Original: returns the smaller of two elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
retorna o elemento mais pequeno de um intervalo Original: returns the smallest element 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 funo) | |
(C++11) |
retorna o. maior e o menor dos dois elementos Original: returns the larger and the smaller of two elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
(C++11) |
retorna o elemento menor e maior em um intervalo Original: returns the smallest and the largest element 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 funo) |
retorna true se um intervalo lexicograficamente menor do que outro Original: returns true if one range is lexicographically less than another The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
(C++11) |
determines if a sequence is a permutation of another sequence (modelo de funo) |
| generates the next greater lexicographic permutation of a range of elements (modelo de funo) | |
| generates the next smaller lexicographic permutation of a range of elements (modelo de funo) | |
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. | |
Defined in header
<numeric> | |
(C++11) |
preenche um intervalo com incrementos sucessivos do valor de partida Original: fills a range with successive increments of the starting value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) |
resume uma srie de elementos Original: sums up a range of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
calcula o produto interno de duas gamas de elementos Original: computes the inner product of two ranges of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
calcula as diferenas entre elementos adjacentes em forma de intervalo Original: computes the differences between adjacent 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 funo) | |
calcula a soma parcial de um conjunto de elementos Original: computes the partial sum of a range of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de funo) | |
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
<cstdlib> | |
Classifica um intervalo de elementos de tipo no especificado Original: sorts a range of elements with unspecified type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funo) | |
procura uma matriz para um elemento de tipo no especificado Original: searches an array for an element of unspecified type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funo) | |