Namensräume
Varianten
Aktionen

Containers library

Aus cppreference.com
< cpp


Die Container-Bibliothek ist eine generische Auflistung von Klassen-Templates und Algorithmen, die Programmierern die einfache Implementierung gemeinsamen Datenstrukturen wie Warteschlangen, Listen und Stacks ermöglichen. Es gibt drei Arten von Behältnissen - Sequenz Container, assoziative Container und ungeordnete assoziative Container - von denen jeder entworfen, um eine andere Gruppe von Operationen unterstützt wird .
Original:
The Containers library is a generic collection of class templates and algorithms that allow programmers to easily implement common data structures like queues, lists and stacks. There are three classes of containers -- sequence containers, associative containers, and unordered associative containers -- each of which is designed to support a different set of operations.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Der Behälter verwaltet den Speicherplatz, der für seine Elemente zugeordnet ist und stellt Elementfunktionen auf sie zuzugreifen, entweder direkt oder durch Iteratoren (Objekte mit ähnlichen Eigenschaften wie Zeigern) .
Original:
The container manages the storage space that is allocated for its elements and provides member functions to access them, either directly or through iterators (objects with similar properties to pointers).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Die meisten Container mindestens mehrere Member-Funktionen gemeinsam, und Aktien-Funktionalitäten. Welche Behälter ist die beste für die jeweilige Anwendung hängt nicht nur von der angebotenen Funktionalitäten, sondern auch auf ihre Effizienz für unterschiedliche Workloads .
Original:
Most containers have at least several member functions in common, and share functionalities. Which container is the best for the particular application depends not only on the offered functionality, but also on its efficiency for different workloads.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Sequence Container

Sequence Container implementieren Datenstrukturen, die nacheinander aufgerufen werden können .
Original:
Sequence containers implement data structures which can be accessed sequentially.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(seit C++11)
statische zusammenhängende Array
Original:
static contiguous array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
dynamischen zusammenhängende Array
Original:
dynamic contiguous array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
double-ended Queue
Original:
double-ended queue
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
(seit C++11)
einfach verknüpfte Liste
Original:
singly-linked list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
doppelt verknüpfte Liste
Original:
doubly-linked list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]

[Bearbeiten] Assoziative Container

Assoziative Container implementieren sortierten Daten Strukturen, die schnell durchsucht werden (O(log n) Komplexität) kann .
Original:
Associative containers implement sorted data structures that can be quickly searched (O(log n) complexity).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Sammlung von einzigartigen Schlüssel, durch Schlüssel sortiert
Original:
collection of unique keys, sorted by keys
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
Auflistung von Schlüssel-Wert-Paaren, von Schlüsseln sortiert sind Schlüssel einzigartig
Original:
collection of key-value pairs, sorted by keys, keys are unique
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
collection of keys, sorted by keys
(Klassen-Template) [edit]
Auflistung von Schlüssel-Wert-Paaren, durch Schlüssel sortiert
Original:
collection of key-value pairs, sorted by keys
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]

[Bearbeiten] Ungeordnete assoziativen Containern

Assoziative Container implementieren unsortiert (Hash) Datenstrukturen, die schnell durchsucht werden (O(1) abgeschrieben, O(n) Worst-Case-Komplexität) kann .
Original:
Associative containers implement unsorted (hashed) data structures that can be quickly searched (O(1) amortized, O(n) worst-case complexity).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(seit C++11)
Sammlung von einzigartigen Schlüssel, durch Schlüssel gehasht
Original:
collection of unique keys, hashed by keys
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
(seit C++11)
Auflistung von Schlüssel-Wert-Paaren, gehasht durch Tasten, sind der Schlüssel einzigartig
Original:
collection of key-value pairs, hashed by keys, keys are unique
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
Sammlung von Schlüsseln, mit den Tasten Hash
Original:
collection of keys, hashed by keys
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
Auflistung von Schlüssel-Wert-Paaren, durch Schlüssel gehasht
Original:
collection of key-value pairs, hashed by keys
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]

[Bearbeiten] Behälter Adaptern

Container-Adapter bieten eine andere Schnittstelle für sequentielle Container .
Original:
Container adaptors provide a different interface for sequential containers.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
passt einen Container Stack (LIFO-Datenstruktur) bieten
Original:
adapts a container to provide stack (LIFO data structure)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
passt einen Behälter zur Warteschlange (FIFO Datenstruktur) bereitzustellen
Original:
adapts a container to provide queue (FIFO data structure)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]
passt einen Container Prioritätswarteschlange bieten
Original:
adapts a container to provide priority queue
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template) [edit]

[Bearbeiten] Member-Funktion Tisch

- functions present in C++03
- functions present since C++11
Sequence containers Associative containers Unordered associative containers Container adaptors
Headers <array> <vector> <deque> <forward_list> <list> <set> <map> <unordered_set> <unordered_map> <stack> <queue>
 
array
vector
deque
forward_list
list
set
multiset
map
multimap
unordered_set
unordered_multiset
unordered_map
unordered_multimap
stack
queue
priority_queue
(constructor)
(implicit)
vector
deque
forward_list
list
set
multiset
map
multimap
unordered_set
unordered_multiset
unordered_map
unordered_multimap
stack
queue
priority_queue
(destructor)
(implicit)
~vector
~deque
~forward_list
~list
~set
~multiset
~map
~multimap
~unordered_set
~unordered_multiset
~unordered_map
~unordered_multimap
~stack
~queue
~priority_queue
operator=
(implicit)
operator=
operator=
operator=
operator=
operator=
operator=
operator=
operator=
operator=
operator=
operator=
operator=
operator=
operator=
operator=
assign
N/A
assign
assign
assign
assign
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Iterators
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
begin
cbegin
N/A N/A N/A
end
cend
end
cend
end
cend
end
cend
end
cend
end
cend
end
cend
end
cend
end
cend
end
cend
end
cend
end
cend
end
cend
end
cend
N/A N/A N/A
rbegin
crbegin
rbegin
crbegin
rbegin
crbegin
rbegin
crbegin
N/A
rbegin
crbegin
rbegin
crbegin
rbegin
crbegin
rbegin
crbegin
rbegin
crbegin
N/A N/A N/A N/A N/A N/A N/A
rend
crend
rend
crend
rend
crend
rend
crend
N/A
rend
crend
rend
crend
rend
crend
rend
crend
rend
crend
N/A N/A N/A N/A N/A N/A N/A
Element
access
at
at
at
at
N/A N/A N/A N/A
at
N/A N/A N/A
at
N/A N/A N/A N/A
operator[]
operator[]
operator[]
operator[]
N/A N/A N/A N/A
operator[]
N/A N/A N/A
operator[]
N/A N/A N/A N/A
front
front
front
front
front
front
N/A N/A N/A N/A N/A N/A N/A N/A N/A
front
top
back
back
back
back
N/A
back
N/A N/A N/A N/A N/A N/A N/A N/A
top
back
N/A
Capacity
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
empty
size
size
size
size
N/A
size
size
size
size
size
size
size
size
size
size
size
size
max_size
max_size
max_size
max_size
max_size
max_size
max_size
max_size
max_size
max_size
max_size
max_size
max_size
max_size
N/A N/A N/A
resize
N/A
resize
resize
resize
resize
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
capacity
N/A
capacity
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
reserve
N/A
reserve
N/A N/A N/A N/A N/A N/A N/A
reserve
reserve
reserve
reserve
N/A N/A N/A
shrink_to_fit
N/A
shrink_to_fit
shrink_to_fit
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Modifiers
clear
N/A
clear
clear
clear
clear
clear
clear
clear
clear
clear
clear
clear
clear
N/A N/A N/A
insert
N/A
insert
insert
insert_after
insert
insert
insert
insert
insert
insert
insert
insert
insert
N/A N/A N/A
emplace
N/A
emplace
emplace
emplace_after
emplace
emplace
emplace
emplace
emplace
emplace
emplace
emplace
emplace
N/A N/A N/A
emplace_hint
N/A N/A N/A N/A N/A
emplace_hint
emplace_hint
emplace_hint
emplace_hint
emplace_hint
emplace_hint
emplace_hint
emplace_hint
N/A N/A N/A
erase
N/A
erase
erase
erase_after
erase
erase
erase
erase
erase
erase
erase
erase
erase
N/A N/A N/A
push_front
N/A N/A
push_front
push_front
push_front
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
emplace_front
N/A N/A
emplace_front
emplace_front
emplace_front
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
pop_front
N/A N/A
pop_front
pop_front
pop_front
N/A N/A N/A N/A N/A N/A N/A N/A N/A
pop
N/A
push_back
N/A
push_back
push_back
N/A
push_back
N/A N/A N/A N/A N/A N/A N/A N/A
push
push
push
emplace_back
N/A
emplace_back
emplace_back
N/A
emplace_back
N/A N/A N/A N/A N/A N/A N/A N/A
emplace
emplace
emplace
pop_back
N/A
pop_back
pop_back
N/A
pop_back
N/A N/A N/A N/A N/A N/A N/A N/A
pop
N/A
pop
swap
swap
swap
swap
swap
swap
swap
swap
swap
swap
swap
swap
swap
swap
swap
swap
swap
List operations
merge
N/A N/A N/A N/A
merge
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
splice
N/A N/A N/A N/A
splice
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
remove
N/A N/A N/A N/A
remove
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
remove_if
N/A N/A N/A N/A
remove_if
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
reverse
N/A N/A N/A N/A
reverse
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
unique
N/A N/A N/A N/A
unique
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
sort
N/A N/A N/A N/A
sort
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Lookup
count
N/A N/A N/A N/A N/A
count
count
count
count
count
count
count
count
N/A N/A N/A
find
N/A N/A N/A N/A N/A
find
find
find
find
find
find
find
find
N/A N/A N/A
lower_bound
N/A N/A N/A N/A N/A
lower_bound
lower_bound
lower_bound
lower_bound
N/A N/A N/A N/A N/A N/A N/A
upper_bound
N/A N/A N/A N/A N/A
upper_bound
upper_bound
upper_bound
upper_bound
N/A N/A N/A N/A N/A N/A N/A
equal_range
N/A N/A N/A N/A N/A
equal_range
equal_range
equal_range
equal_range
equal_range
equal_range
equal_range
equal_range
N/A N/A N/A
Observers
key_comp
N/A N/A N/A N/A N/A
key_comp
key_comp
key_comp
key_comp
N/A N/A N/A N/A N/A N/A N/A
value_comp
N/A N/A N/A N/A N/A
value_comp
value_comp
value_comp
value_comp
N/A N/A N/A N/A N/A N/A N/A
hash_function
N/A N/A N/A N/A N/A N/A N/A N/A N/A
hash_function
hash_function
hash_function
hash_function
N/A N/A N/A
key_eq
N/A N/A N/A N/A N/A N/A N/A N/A N/A
key_eq
key_eq
key_eq
key_eq
N/A N/A N/A
Allocator
get_allocator
N/A
get_allocator
get_allocator
get_allocator
get_allocator
get_allocator
get_allocator
get_allocator
get_allocator
get_allocator
get_allocator
get_allocator
get_allocator
N/A N/A N/A
 
array
vector
deque
forward_list
list
set
multiset
map
multimap
unordered_set
unordered_multiset
unordered_map
unordered_multimap
stack
queue
priority_queue
Sequence containers Associative containers Unordered associative containers Container adaptors