std::priority_queue
来自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 <queue>
|
||
| template< class T, |
||
优先级队列是一个容器,它允许为恒定的时间的最大(或最小,取决于
Compare)在对数插入牺牲萃取。工作用priority_queue类似管理堆在一些随机接入容器,与不能够意外失效堆的利益.Original:
Priority queue is a container that allows for constant time maximum (or minimum, depending on
Compare) extraction at the expense of logarithmic insertion. Working with a priority_queue is similar to managing a 堆 in some random access container, with the benefit of not being able to accidentally invalidate the heap.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 |
container_type
|
Container
|
value_type
|
Container::value_type
|
size_type
|
Container::size_type
|
reference
|
Container::reference
|
const_reference
|
Container::const_reference
|
[编辑] 成员函数
| 构建 priority_queue Original: constructs the priority_queue The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
destructs the priority_queue (公共成员函数) | |
| 将值指派给容器适配器 Original: assigns values to the container adaptor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
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. | |
| 访问的顶级元素 Original: access the top element 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 underlying 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: Modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| inserts element and sorts the underlying container (公共成员函数) | |
| (C++11) |
constructs element in-place and sorts the underlying container (公共成员函数) |
| 删除第一个元素 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. (公共成员函数) | |
| 交换的内容 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: Member objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| Container c |
基础容器 Original: the underlying container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员对象) |
| Compare comp |
比较函数对象 Original: the comparison function object 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. (函数模板) | |
[编辑] Helper类
| 专业的std::uses_allocator型特征 Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |