Espacios de nombres
Variantes
Acciones

std::deque

De cppreference.com
< cpp‎ | container


 
 
 
std :: deque
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.
Elemento acceso
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.
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.
 
Definido en la cabecera <deque>
template<

    class T,
    class Allocator = std::allocator<T>

> class deque;
std::deque (de doble extremo cola) es un contenedor de secuencias indexado que permite la rápida inserción y deleción en ambos, el principio y el fin. Además, nunca inserción y eliminación en cualquier extremo de un deque invalida punteros o referencias para el resto de los elementos .
Original:
std::deque (double-ended queue) is an indexed sequence container that allows fast insertion and deletion at both the beginning and the end. In addition, insertion and deletion at either end of a deque never invalidates pointers or references to the rest of the elements.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A diferencia de std::vector, los elementos de un deque no se almacenan de forma contigua: implementaciones típicas utilizar una secuencia de individualmente asignados fijo matrices de tamaño .
Original:
As opposed to std::vector, the elements of a deque are not stored contiguously: typical implementations use a sequence of individually allocated fixed-size arrays.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
El almacenamiento de la deque se expande automáticamente y se contrajo, según sea necesario. La expansión de un deque es más barata que la expansión de una std::vector porque no implica la copia de los elementos existentes para una nueva posición de memoria .
Original:
The storage of the deque is automatically expanded and contracted as needed. Expansion of a deque is cheaper than the expansion of a std::vector because it does not involve copying of the existing elements to a new memory location.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La complejidad (eficacia) de las operaciones comunes en deques es como sigue:
Original:
The complexity (efficiency) of common operations on deques is as follows:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Acceso aleatorio - O(1) constante
    Original:
    Random access - constant O(1)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Inserción o extracción de elementos al final o al principio - O(1) constante amortizado
    Original:
    Insertion or removal of elements at the end or beginning - amortized constant O(1)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • La inserción o eliminación de elementos - O(n) lineal
    Original:
    Insertion or removal of elements - linear O(n)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
std::deque cumple los requisitos de Container, AllocatorAwareContainer, SequenceContainer y ReversibleContainer .
Original:
std::deque meets the requirements of Container, AllocatorAwareContainer, SequenceContainer and ReversibleContainer.
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
value_type T [editar]
allocator_type Allocator [editar]
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.
[editar]
difference_type Signed integer type (usually ptrdiff_t) [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 RandomAccessIterator [editar]
const_iterator
Iterador constante de acceso aleatorio
Original:
Constant random access iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[editar]
reverse_iterator std::reverse_iterator<iterator> [editar]
const_reverse_iterator std::reverse_iterator<const_iterator> [editar]

[editar] Las funciones miembro

construye el deque
Original:
constructs the deque
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úblico) [editar]
destructs the deque
(función miembro público) [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úblico) [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úblico) [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úblico) [editar]
Elemento acceso
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.
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.

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

(función miembro público) [editar]
acceso al primer elemento
Original:
access the first element
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úblico) [editar]
access the last element
(función miembro público) [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
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.

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

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

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

(función miembro público) [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 recipiente está vacío
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.

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

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

(función miembro público) [editar]
reduce el uso de memoria por la liberación de memoria no utilizada
Original:
reduces memory usage by freeing unused memory
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úblico) [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úblico) [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úblico) [editar]
(C++11)
constructs element in-place
(función miembro público) [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úblico) [editar]
agrega elementos al final
Original:
adds elements 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.

(función miembro público) [editar]
construye elementos en lugar de al final
Original:
constructs elements in-place at the end
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úblico) [editar]
elimina el último elemento
Original:
removes 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.

(función miembro público) [editar]
inserciones elementos al principio
Original:
inserts elements 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.

(función miembro público) [editar]
construye elementos en lugar de al principio
Original:
constructs elements in-place at the beginning
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úblico) [editar]
elimina el primer elemento
Original:
removes the first element
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úblico) [editar]
changes the number of elements stored
(función miembro público) [editar]
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.

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

[editar] Terceros funciones

lexicográficamente compara los valores del deque
Original:
lexicographically compares the values in the deque
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 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.

(plantilla de función) [editar]