std::multimap
来自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, |
||
multimap中是一个关联容器,它包含一个键 - 值对排序的列表。分类是根据比较函数
Compare,施加到键。搜索,插入和删除操作具有对数的复杂性.Original:
Multimap is an associative container that contains a sorted list of key-value pairs. Sorting is done according to the comparison function
Compare, applied to the keys. Search, insertion, and removal operations have logarithmic 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:
The order of the key-value pairs whose keys compare equivalent is the order of insertion and does not change. (C++11 起)
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::multimap符合要求的Container,AllocatorAwareContainer,AssociativeContainer和ReversibleContainer.Original:
std::multimap 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.
[编辑] 会员类型
| 会员类型
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
|
无符号整数类型(通常是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 (至 C++11)value_type& (C++11 起)
|
const_reference
|
Allocator::const_reference (至 C++11)const value_type& (C++11 起)
|
pointer
|
Allocator::pointer (至 C++11)std::allocator_traits<Allocator>::pointer (C++11 起) |
const_pointer
|
Allocator::const_pointer (至 C++11) std::allocator_traits<Allocator>::const_pointer (C++11 起) |
iterator
|
BidirectionalIterator
|
const_iterator
|
常量双向迭代器 |
reverse_iterator
|
std::reverse_iterator<iterator> |
const_reverse_iterator
|
std::reverse_iterator<const_iterator> |
[编辑] 会员类别
| 比较对象类型 value_typeOriginal: 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. (类) | |
[编辑] 成员函数
| 构建 multimap Original: constructs the multimap The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
destructs the multimap (公共成员函数) | |
| 将值分配到容器中 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. (公共成员函数) | |
| 返回的关联分配器 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. (公共成员函数) | |
Original: Iterators The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 返回一个迭代的开始 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. (公共成员函数) | |
| 返回一个迭代的结束 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. (公共成员函数) | |
| 返回一个反向迭代的开始 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. (公共成员函数) | |
| 返回一个反向迭代结束 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. (公共成员函数) | |
Original: Capacity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 检查是否容器是空的 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. (公共成员函数) | |
| 返回的元素数 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. (公共成员函数) | |
| 返回可能的最大数量的元素 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. (公共成员函数) | |
Original: Modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 清除其内容 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. (公共成员函数) | |
| 插入元素 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. (公共成员函数) | |
| (C++11) |
constructs element in-place (公共成员函数) |
| (C++11) |
构建了一丝元素的地方使用 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. (公共成员函数) |
| 擦除元素 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. (公共成员函数) | |
| 交换的内容 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. (公共成员函数) | |
Original: Lookup The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 返回匹配的特定键的元素的数量 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. (公共成员函数) | |
| 发现与特定键的元素 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. (公共成员函数) | |
| 回报在一个特定的键匹配的元素 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. (公共成员函数) | |
| 返回一个迭代器的第一个元素“不低于”大于给定值 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. (公共成员函数) | |
| 返回一个迭代器的第一个元素“更大的”超过一定值 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. (公共成员函数) | |
Original: Observers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 比较键返回功能 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. (公共成员函数) | |
| 返回键类型value_type类型的对象进行比较的功能, 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. (公共成员函数) | |
[编辑] 非成员函数
| 字典中的值比较的multimap Original: lexicographically compares the values in the multimap The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
| 专业的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. (函数模板) | |