Containers library
来自cppreference.com
< cpp
|
|
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. |
容器库的泛型集合类模板和算法,使程序员可以很容易地实现常见的数据结构,如队列,列表和堆栈。有三类容器 - 序列容器,关联容器,和无序关联式容器 - 每一个被设计成支持一组不同的操作..
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.
You can help to correct and verify the translation. Click here for instructions.
容器管理的存储空间分配给它的元素,并提供成员函数来访问他们,无论是直接或通过迭代器(类似性质的对象的指针).
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.
You can help to correct and verify the translation. Click here for instructions.
大多数容器有至少几个成员函数是共同的,和共享功能。其中集装箱为特定的应用程序是最好的,不仅取决于所提供的功能,而且它的效率为不同的工作负载.
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.
You can help to correct and verify the translation. Click here for instructions.
目录 |
[编辑] 序列容器
序列容器实现的数据结构,可以按顺序访问.
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.
You can help to correct and verify the translation. Click here for instructions.
| (C++11 起) |
静态连续的数组 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. (类模板) |
| 动态连续的数组 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. (类模板) | |
| 双端队列 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. (类模板) | |
| (C++11 起) |
单链表 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. (类模板) |
| 双向链表 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. (类模板) | |
[编辑] 关联容器
关联容器实现排序的数据结构,可以快速搜索(O(log n)的复杂性).
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.
You can help to correct and verify the translation. Click here for instructions.
| 唯一键的集合,排序的键 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. (类模板) | |
| 通过按键的键 - 值对的集合,排序,钥匙都是独一无二的 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. (类模板) | |
| collection of keys, sorted by keys (类模板) | |
| 通过按键的键 - 值对的集合,排序 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. (类模板) | |
[编辑] 无序关联式容器
实施无序关联容器(散列)的数据结构,可以快速搜索(O(1)摊销,O(n)最坏情况的复杂性).
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.
You can help to correct and verify the translation. Click here for instructions.
| (C++11 起) |
收集的唯一键,键哈希运算 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. (类模板) |
| (C++11 起) |
键 - 值对的集合,散列键,键是唯一的 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. (类模板) |
| (C++11 起) |
集合中的密钥,通过键散列 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. (类模板) |
| (C++11 起) |
通过按键的键 - 值对的集合,散列 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. (类模板) |
[编辑] 容器适配器
容器适配器提供不同的接口顺序容器.
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.
You can help to correct and verify the translation. Click here for instructions.
| 适应容器提供堆栈(后进先出的数据结构) 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. (类模板) | |
| 适应容器提供队列(FIFO数据结构) 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. (类模板) | |
| 适应容器提供优先级队列 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. (类模板) | |
[编辑] 成员函数表
| - functions present in C++03 | |
| - functions present since C++11 |

