Espacios de nombres
Variantes
Acciones

Cabecera de la Librería Estándar <algorithm>

De cppreference.com
< cpp‎ | header
 
 
 

Esta cabecera es parte de la librería algorithm.

Contenido

[editar] Functions

Operaciones no modificadoras sobre secuencias
(C++11)(C++11)(C++11)
comprueba si un predicado es true para todos, alguno o ninguno de de los elementos en un rango
(plantilla de función) [editar]
se aplica una función a una serie 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.

(plantilla de función) [editar]
devuelve el número de elementos que cumplan criterios específicos
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.

(plantilla de función) [editar]
encuentra la primera posición donde dos rangos difieren
(plantilla de función) [editar]
determina si dos conjuntos de elementos son los mismos
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.

(plantilla de función) [editar]
encuentra el primer elemento que satisfaga los criterios específicos
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.

(plantilla de función) [editar]
encuentra la última secuencia de elementos en un cierto rango
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.

(plantilla de función) [editar]
busca cualquiera de los elementos de un set
(plantilla de función) [editar]
encuentra dos elementos contiguos idénticos (o que satisfacen un predicado)
(plantilla de función) [editar]
busca a un rango de elementos
(plantilla de función) [editar]
Busca un número de copias consecutivas de un elemento en un rango
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.

(plantilla de función) [editar]
Operaciones modificadoras sobre secuencias
Copia un intervalo de elementos a una nueva ubicación
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.

(plantilla de función) [editar]
(C++11)
copia un número de elementos a una nueva ubicación
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.

(plantilla de función) [editar]
Copia un intervalo de elementos para atrás
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.

(plantilla de función) [editar]
(C++11)
mueve una serie de elementos a una nueva ubicación
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.

(plantilla de función) [editar]
mueve una serie de elementos a una nueva ubicación para atrás
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.

(plantilla de función) [editar]
asigna una serie de elementos de un cierto 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.

(plantilla de función) [editar]
asigna un valor a una serie 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.

(plantilla de función) [editar]
se aplica una función a una serie 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.

(plantilla de función) [editar]
guarda el resultado de una función en un 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.

(plantilla de función) [editar]
guarda el resultado de las aplicaciones de N de una función
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.

(plantilla de función) [editar]
elimina elementos que cumplan criterios específicos
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.

(plantilla de función) [editar]
Copia un intervalo de elementos omitiendo los que satisfacen criterios específicos
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.

(plantilla de función) [editar]
sustituye a todos los valores que satisfacen los criterios específicos con otro 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.

(plantilla de función) [editar]
Copia un intervalo, en sustitución de elementos que cumplan criterios específicos con otro 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.

(plantilla de función) [editar]
intercambia los valores de dos 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.

(plantilla de función) [editar]
swaps dos rangos 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.

(plantilla de función) [editar]
intercambia los elementos apuntado por dos 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.

(plantilla de función) [editar]
invierte los elementos de orden en un 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.

(plantilla de función) [editar]
crea una copia de un rango que se invierte
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.

(plantilla de función) [editar]
gira el orden de los elementos en un rango
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.

(plantilla de función) [editar]
copias y girar una serie 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.

(plantilla de función) [editar]
azar reordena los elementos de un rango
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.

(plantilla de función) [editar]
removes consecutive duplicate elements in a range
(plantilla de función) [editar]
crea una copia de una cierta gama de elementos que no contiene duplicados consecutivos
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.

(plantilla de función) [editar]
Operaciones de partición
determina si el intervalo está dividido por el 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.

(plantilla de función) [editar]
divide una serie de elementos en dos 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.

(plantilla de función) [editar]
copies a range dividing the elements into two groups
(plantilla de función) [editar]
elementos divide en dos grupos, preservando su orden relativo
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.

(plantilla de función) [editar]
locates the partition point of a partitioned range
(plantilla de función) [editar]
Operaciones de ordenación
(C++11)
Comprueba si un rango se clasifican en orden ascendente
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.

(plantilla de función) [editar]
encuentra el mayor subrango ordenados
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.

(plantilla de función) [editar]
Ordena un intervalo en orden ascendente
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.

(plantilla de función) [editar]
ordena los primeros n elementos de un rango
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.

(plantilla de función) [editar]
copias y clasifica parcialmente una serie 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.

(plantilla de función) [editar]
Ordena un intervalo de elementos, mientras que la preservación del orden entre los elementos iguales
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.

(plantilla de función) [editar]
parcialmente ordena el rango dado asegurándose de que está dividida por el 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.

(plantilla de función) [editar]
Operaciones de búsqueda binaria (en rangos ordenados)
devuelve un iterador al primer elemento no es menor que el 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.

(plantilla de función) [editar]
devuelve un iterador al primer elemento' mayor que un cierto 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.

(plantilla de función) [editar]
determina si existe un elemento en un cierto rango
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.

(plantilla de función) [editar]
El rendimiento es de los elementos que coinciden con una clave específica
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.

(plantilla de función) [editar]
Operaciones de set (en rangos ordenados)
fusiona dos rangos ordenados
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.

(plantilla de función) [editar]
fusiona dos rangos ordenados en el lugar
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.

(plantilla de función) [editar]
devuelve verdadero si un grupo es un subconjunto de otro
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.

(plantilla de función) [editar]
calcula la diferencia entre los dos 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.

(plantilla de función) [editar]
calcula la intersección de dos 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.

(plantilla de función) [editar]
calcula la diferencia simétrica entre dos conjuntos
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.

(plantilla de función) [editar]
computes the union of two sets
(plantilla de función) [editar]
Operaciones de pila
checks if the given range is a heap
(plantilla de función) [editar]
encuentra el mayor subrango que es montón
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.

(plantilla de función) [editar]
crea un montón de una serie 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.

(plantilla de función) [editar]
añade un elemento a un montón
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.

(plantilla de función) [editar]
elimina el elemento más grande de un montón
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.

(plantilla de función) [editar]
Resulta un montón en una gama de elementos ordenados
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.

(plantilla de función) [editar]
Operaciones de mínimo/máximo
(C++17)
resitringe un valor entre un par de valores limitantes
(plantilla de función) [editar]
devuelve el mayor de los dos 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.

(plantilla de función) [editar]
devuelve el elemento más grande de un rango
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.

(plantilla de función) [editar]
devuelve el menor de los dos 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.

(plantilla de función) [editar]
devuelve el elemento más pequeño de un rango
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.

(plantilla de función) [editar]
(C++11)
devuelve el. más grande y el más pequeño de los dos 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.

(plantilla de función) [editar]
devuelve el elemento más pequeño y el más grande en un rango
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.

(plantilla de función) [editar]
devuelve true si el rango es menor que otro lexicográfico
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.

(plantilla de función) [editar]
determines if a sequence is a permutation of another sequence
(plantilla de función) [editar]
generates the next greater lexicographic permutation of a range of elements
(plantilla de función) [editar]
generates the next smaller lexicographic permutation of a range of elements
(plantilla de función) [editar]

[editar] Sinopsis

#include <initializer_list>
namespace std
{
    // operaciones no modificadoras sobre secuencias:
    template <class InputIterator, class Predicado>
        bool all_of(InputIterator primero, InputIterator ultimo, Predicado pred);
    template <class InputIterator, class Predicado>
        bool any_of(InputIterator primero, InputIterator ultimo, Predicado pred);
    template <class InputIterator, class Predicado>
        bool none_of(InputIterator primero, InputIterator ultimo, Predicado pred);
 
    template<class InputIterator, class Funcion>
        Funcion for_each(InputIterator primero, InputIterator ultimo, Funcion f);
 
    template<class InputIterator, class T>
        InputIterator find(InputIterator primero, InputIterator ultimo,
                           const T& value);
    template<class InputIterator, class Predicado>
        InputIterator find_if(InputIterator primero, InputIterator ultimo,
                              Predicado pred);
    template<class InputIterator, class Predicado>
        InputIterator find_if_not(InputIterator primero, InputIterator ultimo,
                                  Predicado pred);
 
    template<class ForwardIterator1, class ForwardIterator2>
        ForwardIterator1
        find_end(ForwardIterator1 primero1, ForwardIterator1 ultimo1,
                 ForwardIterator2 primero2, ForwardIterator2 ultimo2);
    template<class ForwardIterator1, class ForwardIterator2,
             class PredicadoBinario>
        ForwardIterator1
        find_end(ForwardIterator1 primero1, ForwardIterator1 ultimo1,
                 ForwardIterator2 primero2, ForwardIterator2 ultimo2,
                 PredicadoBinario pred);
 
    template<class InputIterator, class ForwardIterator>
        InputIterator
        find_first_of(InputIterator primero1, InputIterator ultimo1,
                      ForwardIterator primero2, ForwardIterator ultimo2);
    template<class InputIterator, class ForwardIterator,
             class PredicadoBinario>
        InputIterator
        find_first_of(InputIterator primero1, InputIterator ultimo1,
                      ForwardIterator primero2, ForwardIterator ultimo2,
                      PredicadoBinario pred);
 
    template<class ForwardIterator>
        ForwardIterator adjacent_find(ForwardIterator primero,
                                      ForwardIterator ultimo);
    template<class ForwardIterator, class PredicadoBinario>
        ForwardIterator adjacent_find(ForwardIterator primero,
                                      ForwardIterator ultimo,
                                      PredicadoBinario pred);
    template<class InputIterator, class T>
        typename iterator_traits<InputIterator>::difference_type
        count(InputIterator primero, InputIterator ultimo, const T& value);
    template<class InputIterator, class Predicado>
        typename iterator_traits<InputIterator>::difference_type
        count_if(InputIterator primero, InputIterator ultimo, Predicado pred);
 
    template<class InputIterator1, class InputIterator2>
        pair<InputIterator1, InputIterator2>
        mismatch(InputIterator1 primero1, InputIterator1 ultimo1,
                 InputIterator2 primero2);
    template<class InputIterator1, class InputIterator2, class PredicadoBinario>
        pair<InputIterator1, InputIterator2>
        mismatch(InputIterator1 primero1, InputIterator1 ultimo1,
                 InputIterator2 primero2, PredicadoBinario pred);
 
    template<class InputIterator1, class InputIterator2>
        bool equal(InputIterator1 primero1, InputIterator1 ultimo1,
                   InputIterator2 primero2);
    template<class InputIterator1, class InputIterator2, class PredicadoBinario>
        bool equal(InputIterator1 primero1, InputIterator1 ultimo1,
                   InputIterator2 primero2, PredicadoBinario pred);
 
    template<class ForwardIterator1, class ForwardIterator2>
        bool is_permutation(ForwardIterator1 primero1, ForwardIterator1 ultimo1,
                            ForwardIterator2 primero2);
    template<class ForwardIterator1, class ForwardIterator2,
    class PredicadoBinario>
        bool is_permutation(ForwardIterator1 primero1, ForwardIterator1 ultimo1,
                            ForwardIterator2 primero2, PredicadoBinario pred);
 
    template<class ForwardIterator1, class ForwardIterator2>
        ForwardIterator1 search(
            ForwardIterator1 primero1, ForwardIterator1 ultimo1,
            ForwardIterator2 primero2, ForwardIterator2 ultimo2);
    template<class ForwardIterator1, class ForwardIterator2,
             class PredicadoBinario>
        ForwardIterator1 search(
            ForwardIterator1 primero1, ForwardIterator1 ultimo1,
            ForwardIterator2 primero2, ForwardIterator2 ultimo2,
            PredicadoBinario pred);
 
    template<class ForwardIterator, class Size, class T>
        ForwardIterator search_n(ForwardIterator primero, ForwardIterator ultimo,
                                 Size count, const T& value);
    template<class ForwardIterator, class Size, class T, class PredicadoBinario>
        ForwardIterator1 search_n(ForwardIterator primero, ForwardIterator ultimo,
                                  Size count, const T& value,
                                  PredicadoBinario pred);
 
    // operaciones modificadoras sobre secuencias:
 
    // copia:
    template<class InputIterator, class OutputIterator>
        OutputIterator copy(InputIterator primero, InputIterator ultimo,
                            OutputIterator result);
    template<class InputIterator, class Size, class OutputIterator>
        OutputIterator copy_n(InputIterator primero, Size n,
                              OutputIterator result);
    template<class InputIterator, class OutputIterator, class Predicado>
        OutputIterator copy_if(InputIterator primero, InputIterator ultimo,
                               OutputIterator result, Predicado pred);
    template<class BidirectionalIterator1, class BidirectionalIterator2>
        BidirectionalIterator2 copy_backward(
            BidirectionalIterator1 primero, BidirectionalIterator1 ultimo,
            BidirectionalIterator2 result);
 
    // mocimiento:
    template<class InputIterator, class OutputIterator>
        OutputIterator move(InputIterator primero, InputIterator ultimo,
                            OutputIterator result);
    template<class BidirectionalIterator1, class BidirectionalIterator2>
        BidirectionalIterator2 move_backward(
            BidirectionalIterator1 primero, BidirectionalIterator1 ultimo,
            BidirectionalIterator2 result);
 
    // intercambio:
    template<class ForwardIterator1, class ForwardIterator2>
        ForwardIterator2 swap_ranges(ForwardIterator1 primero1,
                                     ForwardIterator1 ultimo1, ForwardIterator2 primero2);
    template<class ForwardIterator1, class ForwardIterator2>
        void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
    template<class InputIterator, class OutputIterator, class UnaryOperation>
        OutputIterator transform(InputIterator primero, InputIterator ultimo,
                                 OutputIterator result, UnaryOperation op);
 
    template<class InputIterator1, class InputIterator2, class OutputIterator,
             class BinaryOperation>
        OutputIterator transform(InputIterator1 primero1, InputIterator1 ultimo1,
                                 InputIterator2 primero2, OutputIterator result,
                                 BinaryOperation binary_op);
 
    template<class ForwardIterator, class T>
        void replace(ForwardIterator primero, ForwardIterator ultimo,
                     const T& old_value, const T& new_value);
    template<class ForwardIterator, class Predicado, class T>
        void replace_if(ForwardIterator primero, ForwardIterator ultimo,
                        Predicado pred, const T& new_value);
    template<class InputIterator, class OutputIterator, class T>
        OutputIterator replace_copy(InputIterator primero, InputIterator ultimo,
                                    OutputIterator result,
                                    const T& old_value, const T& new_value);
    template<class InputIterator, class OutputIterator, class Predicado, class T>
        OutputIterator replace_copy_if(InputIterator primero, InputIterator ultimo,
                                       OutputIterator result,
                                       Predicado pred, const T& new_value);
 
    template<class ForwardIterator, class T>
        void fill(ForwardIterator primero, ForwardIterator ultimo, const T& value);
    template<class OutputIterator, class Size, class T>
        OutputIterator fill_n(OutputIterator primero, Size n, const T& value);
    template<class ForwardIterator, class Generator>
        void generate(ForwardIterator primero, ForwardIterator ultimo,
                      Generator gen);
    template<class OutputIterator, class Size, class Generator>
        OutputIterator generate_n(OutputIterator primero, Size n, Generator gen);
 
    template<class ForwardIterator, class T>
        ForwardIterator remove(ForwardIterator primero, ForwardIterator ultimo,
                               const T& value);
    template<class ForwardIterator, class Predicado>
        ForwardIterator remove_if(ForwardIterator primero, ForwardIterator ultimo,
                                  Predicado pred);
    template<class InputIterator, class OutputIterator, class T>
        OutputIterator remove_copy(InputIterator primero, InputIterator ultimo,
                                   OutputIterator result, const T& value);
    template<class InputIterator, class OutputIterator, class Predicado>
        OutputIterator remove_copy_if(InputIterator primero, InputIterator ultimo,
                                      OutputIterator result, Predicado pred);
 
    template<class ForwardIterator>
        ForwardIterator unique(ForwardIterator primero, ForwardIterator ultimo);
    template<class ForwardIterator, class PredicadoBinario>
        ForwardIterator unique(ForwardIterator primero, ForwardIterator ultimo,
                               PredicadoBinario pred);
    template<class InputIterator, class OutputIterator>
        OutputIterator unique_copy(InputIterator primero, InputIterator ultimo,
                                   OutputIterator result);
    template<class InputIterator, class OutputIterator, class PredicadoBinario>
        OutputIterator unique_copy(InputIterator primero, InputIterator ultimo,
                                   OutputIterator result, PredicadoBinario pred);
 
    template<class BidirectionalIterator>
        void reverse(BidirectionalIterator primero, BidirectionalIterator ultimo);
    template<class BidirectionalIterator, class OutputIterator>
        OutputIterator reverse_copy(BidirectionalIterator primero,
                                    BidirectionalIterator ultimo,
                                    OutputIterator result);
 
    template<class ForwardIterator>
        ForwardIterator rotate(ForwardIterator primero, ForwardIterator middle,
                               ForwardIterator ultimo);
    template<class ForwardIterator, class OutputIterator>
        OutputIterator rotate_copy(
            ForwardIterator primero, ForwardIterator middle,
            ForwardIterator ultimo, OutputIterator result);
 
    template<class RandomAccessIterator>
        void random_shuffle(RandomAccessIterator primero,
                            RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class RandomNumberGenerator>
        void random_shuffle(RandomAccessIterator primero,
                            RandomAccessIterator ultimo,
                            RandomNumberGenerator&& rand);
    template<class RandomAccessIterator, class UniformRandomNumberGenerator>
        void shuffle(RandomAccessIterator primero,
                     RandomAccessIterator ultimo,
                     UniformRandomNumberGenerator&& rand);
 
    // particiones:
    template <class InputIterator, class Predicado>
        bool is_partitioned(InputIterator primero, InputIterator ultimo, Predicado pred);
 
    template<class ForwardIterator, class Predicado>
        ForwardIterator partition(ForwardIterator primero,
                                  ForwardIterator ultimo,
                                  Predicado pred);
 
    template<class BidirectionalIterator, class Predicado>
        BidirectionalIterator stable_partition(BidirectionalIterator primero,
                                               BidirectionalIterator ultimo,
                                               Predicado pred);
 
    template <class InputIterator, class OutputIterator1,
              class OutputIterator2, class Predicado>
        pair<OutputIterator1, OutputIterator2>
        partition_copy(InputIterator primero, InputIterator ultimo,
                       OutputIterator1 out_true, OutputIterator2 out_false,
                       Predicado pred);
 
    template<class ForwardIterator, class Predicado>
        ForwardIterator partition_point(ForwardIterator primero,
                                        ForwardIterator ultimo,
                                        Predicado pred);
 
    // operaciones de ordenación y relacionados:
 
    // sorting:
    template<class RandomAccessIterator>
        void sort(RandomAccessIterator primero, RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        void sort(RandomAccessIterator primero, RandomAccessIterator ultimo,
                  Comparar comp);
 
    template<class RandomAccessIterator>
        void stable_sort(RandomAccessIterator primero, RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        void stable_sort(RandomAccessIterator primero, RandomAccessIterator ultimo,
                         Comparar comp);
 
    template<class RandomAccessIterator>
        void partial_sort(RandomAccessIterator primero,
                          RandomAccessIterator middle,
                          RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        void partial_sort(RandomAccessIterator primero,
                          RandomAccessIterator middle,
                          RandomAccessIterator ultimo, Comparar comp);
    template<class InputIterator, class RandomAccessIterator>
        RandomAccessIterator partial_sort_copy(
            InputIterator primero, InputIterator ultimo,
            RandomAccessIterator result_primero,
            RandomAccessIterator result_ultimo);
    template<class InputIterator, class RandomAccessIterator, class Comparar>
        RandomAccessIterator partial_sort_copy(
            InputIterator primero, InputIterator ultimo,
            RandomAccessIterator result_primero,
            RandomAccessIterator result_ultimo,
            Comparar comp);
 
    template<class ForwardIterator>
        bool is_sorted(ForwardIterator primero, ForwardIterator ultimo);
    template<class ForwardIterator, class Comparar>
        bool is_sorted(ForwardIterator primero, ForwardIterator ultimo,
                       Comparar comp);
    template<class ForwardIterator>
        ForwardIterator is_sorted_until(ForwardIterator primero, ForwardIterator ultimo);
    template<class ForwardIterator, class Comparar>
        ForwardIterator is_sorted_until(ForwardIterator primero, ForwardIterator ultimo,
                                        Comparar comp);
 
    template<class RandomAccessIterator>
        void nth_element(RandomAccessIterator primero, RandomAccessIterator nth,
                         RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        void nth_element(RandomAccessIterator primero, RandomAccessIterator nth,
                         RandomAccessIterator ultimo, Comparar comp);
    // búsqueda binaria:
    template<class ForwardIterator, class T>
        ForwardIterator lower_bound(ForwardIterator primero, ForwardIterator ultimo,
                                    const T& value);
    template<class ForwardIterator, class T, class Comparar>
        ForwardIterator lower_bound(ForwardIterator primero, ForwardIterator ultimo,
                                    const T& value, Comparar comp);
 
    template<class ForwardIterator, class T>
        ForwardIterator upper_bound(ForwardIterator primero, ForwardIterator ultimo,
                                    const T& value);
    template<class ForwardIterator, class T, class Comparar>
        ForwardIterator upper_bound(ForwardIterator primero, ForwardIterator ultimo,
                                    const T& value, Comparar comp);
 
    template<class ForwardIterator, class T>
        pair<ForwardIterator, ForwardIterator>
        equal_range(ForwardIterator primero, ForwardIterator ultimo,
                    const T& value);
    template<class ForwardIterator, class T, class Comparar>
        pair<ForwardIterator, ForwardIterator>
        equal_range(ForwardIterator primero, ForwardIterator ultimo,
                    const T& value, Comparar comp);
 
    template<class ForwardIterator, class T>
        bool binary_search(ForwardIterator primero, ForwardIterator ultimo,
                           const T& value);
    template<class ForwardIterator, class T, class Comparar>
        bool binary_search(ForwardIterator primero, ForwardIterator ultimo,
                           const T& value, Comparar comp);
 
    // unión:
    template<class InputIterator1, class InputIterator2, class OutputIterator>
        OutputIterator merge(InputIterator1 primero1, InputIterator1 ultimo1,
                             InputIterator2 primero2, InputIterator2 ultimo2,
                             OutputIterator result);
    template<class InputIterator1, class InputIterator2, class OutputIterator,
            class Comparar>
        OutputIterator merge(InputIterator1 primero1, InputIterator1 ultimo1,
                             InputIterator2 primero2, InputIterator2 ultimo2,
                             OutputIterator result, Comparar comp);
 
    template<class BidirectionalIterator>
        void inplace_merge(BidirectionalIterator primero,
                           BidirectionalIterator middle,
                           BidirectionalIterator ultimo);
    template<class BidirectionalIterator, class Comparar>
        void inplace_merge(BidirectionalIterator primero,
                           BidirectionalIterator middle,
                           BidirectionalIterator ultimo, Comparar comp);
 
    // operaciones de set:
    template<class InputIterator1, class InputIterator2>
        bool includes(InputIterator1 primero1, InputIterator1 ultimo1,
                      InputIterator2 primero2, InputIterator2 ultimo2);
    template<class InputIterator1, class InputIterator2, class Comparar>
        bool includes(
            InputIterator1 primero1, InputIterator1 ultimo1,
            InputIterator2 primero2, InputIterator2 ultimo2, Comparar comp);
 
    template<class InputIterator1, class InputIterator2, class OutputIterator>
        OutputIterator set_union(InputIterator1 primero1, InputIterator1 ultimo1,
                                 InputIterator2 primero2, InputIterator2 ultimo2,
                                 OutputIterator result);
    template<class InputIterator1, class InputIterator2, class OutputIterator,
             class Comparar>
        OutputIterator set_union(InputIterator1 primero1, InputIterator1 ultimo1,
                                 InputIterator2 primero2, InputIterator2 ultimo2,
                                 OutputIterator result, Comparar comp);
 
    template<class InputIterator1, class InputIterator2, class OutputIterator>
        OutputIterator set_intersection(
            InputIterator1 primero1, InputIterator1 ultimo1,
            InputIterator2 primero2, InputIterator2 ultimo2,
            OutputIterator result);
    template<class InputIterator1, class InputIterator2, class OutputIterator,
             class Comparar>
        OutputIterator set_intersection(
            InputIterator1 primero1, InputIterator1 ultimo1,
            InputIterator2 primero2, InputIterator2 ultimo2,
            OutputIterator result, Comparar comp);
 
    template<class InputIterator1, class InputIterator2, class OutputIterator>
        OutputIterator set_difference(
            InputIterator1 primero1, InputIterator1 ultimo1,
            InputIterator2 primero2, InputIterator2 ultimo2,
            OutputIterator result);
    template<class InputIterator1, class InputIterator2, class OutputIterator,
             class Comparar>
        OutputIterator set_difference(
            InputIterator1 primero1, InputIterator1 ultimo1,
            InputIterator2 primero2, InputIterator2 ultimo2,
            OutputIterator result, Comparar comp);
 
    template<class InputIterator1, class InputIterator2, class OutputIterator>
        OutputIterator set_symmetric_difference(
            InputIterator1 primero1, InputIterator1 ultimo1,
            InputIterator2 primero2, InputIterator2 ultimo2,
            OutputIterator result);
    template<class InputIterator1, class InputIterator2, class OutputIterator,
             class Comparar>
        OutputIterator set_symmetric_difference(
            InputIterator1 primero1, InputIterator1 ultimo1,
            InputIterator2 primero2, InputIterator2 ultimo2,
            OutputIterator result, Comparar comp);
 
    // operaciones de pila:
    template<class RandomAccessIterator>
        void push_heap(RandomAccessIterator primero, RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        void push_heap(RandomAccessIterator primero, RandomAccessIterator ultimo,
                       Comparar comp);
    template<class RandomAccessIterator>
        void pop_heap(RandomAccessIterator primero, RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        void pop_heap(RandomAccessIterator primero, RandomAccessIterator ultimo,
                      Comparar comp);
 
    template<class RandomAccessIterator>
        void make_heap(RandomAccessIterator primero, RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        void make_heap(RandomAccessIterator primero, RandomAccessIterator ultimo,
                       Comparar comp);
 
    template<class RandomAccessIterator>
        void sort_heap(RandomAccessIterator primero, RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        void sort_heap(RandomAccessIterator primero, RandomAccessIterator ultimo,
                       Comparar comp);
 
    template<class RandomAccessIterator>
        bool is_heap(RandomAccessIterator primero, RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        bool is_heap(RandomAccessIterator primero, RandomAccessIterator ultimo, Comparar comp);
    template<class RandomAccessIterator>
        RandomAccessIterator 
            is_heap_until(RandomAccessIterator primero, RandomAccessIterator ultimo);
    template<class RandomAccessIterator, class Comparar>
        RandomAccessIterator 
            is_heap_until(RandomAccessIterator primero, RandomAccessIterator ultimo,
                                           Comparar comp);
    // minimo y maximo:
    template<class T> const T& min(const T& a, const T& b);
    template<class T, class Comparar>
        const T& min(const T& a, const T& b, Comparar comp);
    template<class T>
        T min(initializer_list<T> t);
    template<class T, class Comparar>
        T min(initializer_list<T> t, Comparar comp);
 
    template<class T> const T& max(const T& a, const T& b);
    template<class T, class Comparar>
        const T& max(const T& a, const T& b, Comparar comp);
    template<class T>
        T max(initializer_list<T> t);
    template<class T, class Comparar>
        T max(initializer_list<T> t, Comparar comp);
 
    template<class T> pair<const T&, const T&> minmax(const T& a, const T& b);
    template<class T, class Comparar>
        pair<const T&, const T&> minmax(const T& a, const T& b, Comparar comp);
    template<class T>
        pair<T, T> minmax(initializer_list<T> t);
    template<class T, class Comparar>
        pair<T, T> minmax(initializer_list<T> t, Comparar comp);
 
    template<class ForwardIterator>
        ForwardIterator min_element(ForwardIterator primero, ForwardIterator ultimo);
    template<class ForwardIterator, class Comparar>
        ForwardIterator min_element(ForwardIterator primero, ForwardIterator ultimo,
                                    Comparar comp);
 
    template<class ForwardIterator>
        ForwardIterator max_element(ForwardIterator primero, ForwardIterator ultimo);
    template<class ForwardIterator, class Comparar>
        ForwardIterator max_element(ForwardIterator primero, ForwardIterator ultimo,
                                    Comparar comp);
 
    template<class ForwardIterator>
        pair<ForwardIterator, ForwardIterator>
        minmax_element(ForwardIterator primero, ForwardIterator ultimo);
    template<class ForwardIterator, class Comparar>
        pair<ForwardIterator, ForwardIterator>
        minmax_element(ForwardIterator primero, ForwardIterator ultimo, Comparar comp);
 
    template<class InputIterator1, class InputIterator2>
        bool lexicographical_compare(
            InputIterator1 primero1, InputIterator1 ultimo1,
            InputIterator2 primero2, InputIterator2 ultimo2);
    template<class InputIterator1, class InputIterator2, class Comparar>
        bool lexicographical_compare(
            InputIterator1 primero1, InputIterator1 ultimo1,
            InputIterator2 primero2, InputIterator2 ultimo2,
            Comparar comp);
 
    // permutaciones:
    template<class BidirectionalIterator>
        bool next_permutation(BidirectionalIterator primero,
                              BidirectionalIterator ultimo);
    template<class BidirectionalIterator, class Comparar>
        bool next_permutation(BidirectionalIterator primero,
                              BidirectionalIterator ultimo, Comparar comp);
 
    template<class BidirectionalIterator>
        bool prev_permutation(BidirectionalIterator primero,
                              BidirectionalIterator ultimo);
    template<class BidirectionalIterator, class Comparar>
        bool prev_permutation(BidirectionalIterator primero,
                              BidirectionalIterator ultimo, Comparar comp);
}