X Tutup
The Wayback Machine - https://web.archive.org/web/20210506212856/https://es.cppreference.com/w/cpp/container/set
Espacios de nombres
Variantes
Acciones

std::set

De cppreference.com
< cpp‎ | container
 
 
 
std::set
Las funciones miembro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los iteradores
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Capacidad
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Buscar
Original:
Lookup
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los observadores
Original:
Observers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Definido en el archivo de encabezado <set>
template<

    class Key,
    class Compare = std::less<Key>,
    class Allocator = std::allocator<Key>

> class set;
Set es un contenedor asociativo que contiene un conjunto ordenado de objetos únicos de tipo Key. La clasificación se realiza mediante la tecla de función de comparación compara. Las operaciones de búsqueda, extracción e inserción tiene complejidad logarítmica. Los conjuntos se implementa normalmente como árboles rojo-negro .
Original:
Set is an associative container that contains a sorted set of unique objects of type Key. Sorting is done using the key comparison function Compare. Search, removal, and insertion operations have logarithmic complexity. Sets are usually implemented as árboles rojo-negro.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::set cumple los requisitos de Container, AllocatorAwareContainer, AssociativeContainer y ReversibleContainer .
Original:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Tipos de miembros

Miembro de tipo
Original:
Member type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
key_type Key [editar]
value_type Key [editar]
size_type Tipo entero sin signo (por lo general std::size_t) [editar]
difference_type Tipo entero con signo (por lo general std::ptrdiff_t) [editar]
key_compare Compare [editar]
value_compare Compare [editar]
allocator_type Allocator [editar]
reference Allocator::reference (hasta C++11)
value_type& (desde C++11) [editar]
const_reference Allocator::const_reference (hasta C++11)
const value_type& (desde C++11) [editar]
pointer Allocator::pointer (hasta C++11)
std::allocator_traits<Allocator>::pointer (desde C++11) [editar]
const_pointer Allocator::const_pointer (hasta C++11)
std::allocator_traits<Allocator>::const_pointer (desde C++11) [editar]
iterator LegacyBidirectionalIterator constante [editar]
const_iterator LegacyBidirectionalIterator constante [editar]
reverse_iterator std::reverse_iterator<iterator> [editar]
const_reverse_iterator std::reverse_iterator<const_iterator> [editar]


[editar] Las funciones miembro

Construye el set
(función miembro pública) [editar]
destruye el
Original:
destructs the
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
set
(función miembro pública) [editar]
asigna valores para el contenedor
Original:
assigns values to the container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]
devuelve el asignador asociado
Original:
returns the associated allocator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]
Los iteradores
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Devuelve un iterador al principio
(función miembro pública) [editar]
(C++11)
Devuelve un iterador al final
(función miembro pública) [editar]
Devuelve un iterador inverso al principio
(función miembro pública) [editar]
Devuelve un iterador inverso al final
(función miembro pública) [editar]
Capacidad
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Comprueba si el contenedor está vacío
(función miembro pública) [editar]
Devuelve el número de elementos
(función miembro pública) [editar]
Devuelve el número máximo posible de elementos
(función miembro pública) [editar]
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
borra el contenido
Original:
clears the contents
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]
inserta elementos
Original:
inserts elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]
(C++11)
construye el elemento en el sitio
Original:
constructs element in-place
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]
construye elementos en el lugar utilizando una pista
Original:
constructs elements in-place using a hint
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]
borra elementos
Original:
erases elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]
Intercambia el contenido
(función miembro pública) [editar]
Buscar
Original:
Lookup
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
devuelve el número de elementos coincidentes clave específica
Original:
returns the number of elements matching specific key
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]
encuentra con elemento clave específica
Original:
finds element with specific key
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [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.

(función miembro pública) [editar]
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.

(función miembro pública) [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.

(función miembro pública) [editar]
Los observadores
Original:
Observers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
devuelve la función que compara las llaves
Original:
returns the function that compares keys
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]
devuelve la función que compara claves en objetos de value_type tipo
Original:
returns the function that compares keys in objects of type value_type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública) [editar]

[editar] Terceros funciones

(eliminado en C++20)(eliminado en C++20)(eliminado en C++20)(eliminado en C++20)(eliminado en C++20)(C++20)
Compara lexicográficamente los valores de set
(plantilla de función) [editar]
Especializa el algoritmo std::swap.
(plantilla de función) [editar]
X Tutup