std::map
De cppreference.com
|
|
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. |
| Defined in header <map>
|
||
| template< class Key, |
||
std::map es un contenedor ordenados asociativo que contiene pares clave-valor con claves únicas. Las claves se ordenan mediante el uso de la función de comparación Compare. Las operaciones de búsqueda, extracción e inserción tiene complejidad logarítmica. Los mapas se implementa normalmente como árboles rojo-negro .Original:
std::map is a sorted associative container that contains key-value pairs with unique keys. Keys are sorted by using the comparison function Compare. Search, removal, and insertion operations have logarithmic complexity. Maps 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.
You can help to correct and verify the translation. Click here for instructions.
std::map cumple los requisitos de Container, AllocatorAwareContainer, AssociativeContainer y ReversibleContainer .Original:
std::map meets the requirements of Container, AllocatorAwareContainer, AssociativeContainer and ReversibleContainer.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.
[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
|
mapped_type
|
T
|
value_type
|
std::pair<const Key, T> |
size_type
|
Tipo entero sin signo (por lo general size_t)
Original: Unsigned integral type (usually size_t) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
difference_type
|
Signed integer type (usually ptrdiff_t) |
key_compare
|
Compare
|
allocator_type
|
Allocator
|
reference
|
Allocator::reference (hasta C + +11)value_type& (ya que C + +11)
|
const_reference
|
Allocator::const_reference (hasta C + +11)const value_type& (ya que C + +11)
|
pointer
|
Allocator::pointer (hasta C + +11)std::allocator_traits<Allocator>::pointer (ya que C + +11) |
const_pointer
|
Allocator::const_pointer (hasta C + +11) std::allocator_traits<Allocator>::const_pointer (ya que C + +11) |
iterator
|
BidirectionalIterator
|
const_iterator
|
Iterador bidireccional constante
Original: Constant bidirectional iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
reverse_iterator
|
std::reverse_iterator<iterator> |
const_reverse_iterator
|
std::reverse_iterator<const_iterator> |
[editar] Clases de miembros
| compara objetos de value_type tipoOriginal: compares objects of type value_typeThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase) | |
[editar] Las funciones miembro
| construye el map Original: constructs the map The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
destructs the map (miembro público función) | |
| 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. (miembro público función) | |
| 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. (miembro público función) | |
Original: Element access The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (C++11) |
acceder al elemento especificado con comprobación de límites Original: access specified element with bounds checking The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) |
| acceder al elemento especificado Original: access specified element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
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 Original: returns an iterator to the beginning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
| devuelve un iterador hasta el final Original: returns an iterator to the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
| devuelve un iterador inverso al principio Original: returns a reverse iterator to the beginning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
| devuelve un iterador inverso hasta el final Original: returns a reverse iterator to the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
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 recipiente está vacía Original: checks whether the container is empty The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
| devuelve el número de elementos Original: returns the 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. (miembro público función) | |
| devuelve el número máximo posible de elementos Original: returns the maximum possible 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. (miembro público función) | |
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. (miembro público función) | |
| 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. (miembro público función) | |
| (C++11) |
constructs element in-place (miembro público función) |
| (C++11) |
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. (miembro público función) |
| 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. (miembro público función) | |
| intercambia los contenidos Original: swaps the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
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. (miembro público función) | |
| 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. (miembro público función) | |
| 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. (miembro público función) | |
| 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. (miembro público función) | |
| 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. (miembro público función) | |
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. (miembro público función) | |
| 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. (miembro público función) | |
[editar] Terceros funciones
| lexicográficamente compara los valores de la map Original: lexicographically compares the values in the map The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función de plantilla) | |
| el algoritmo se especializa std::swap Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función de plantilla) | |