std::priority_queue

来自cppreference.com

 
 
容器库
array(C++11)
vector
deque
forward_list(C++11)
list
set
multiset
map
multimap
unordered_set(C++11)
unordered_multiset(C++11)
unordered_map(C++11)
unordered_multimap(C++11)
stack
queue
priority_queue
 
的std :: priority_queue
成员函数
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.
priority_queue::priority_queue
priority_queue::~priority_queue
priority_queue::operator=
元素的访问
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.
priority_queue::top
容量
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
priority_queue::empty
priority_queue::size
修饰符
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
priority_queue::push
priority_queue::emplace
priority_queue::pop
priority_queue::swap
 
Defined in header <queue>
template<

    class T,
    class Container = std::vector<T>,
    class Compare = std::less<typename Container::value_type>

> class priority_queue;
优先级队列是一个容器,它允许为恒定的时间的最大(或最小,取决于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.

目录

[编辑] 会员类型

会员类型
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 [edit]
value_type Container::value_type [edit]
size_type Container::size_type [edit]
reference Container::reference [edit]
const_reference Container::const_reference [edit]

[编辑] 成员函数

构建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.

(公共成员函数) [edit]
destructs the priority_queue
(公共成员函数) [edit]
将值指派给容器适配器
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.

(公共成员函数) [edit]
元素的访问
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.

(公共成员函数) [edit]
容量
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.

(公共成员函数) [edit]
返回的元素数
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.

(公共成员函数) [edit]
修饰符
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
(公共成员函数) [edit]
(C++11)
constructs element in-place and sorts the underlying container
(公共成员函数) [edit]
删除第一个元素
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.

(公共成员函数) [edit]
交换的内容
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.

(公共成员函数) [edit]

会员对象
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.

(受保护的成员对象) [edit]
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.

(函数模板) [edit]

[编辑] 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.

(函数模板) [edit]