std::priority_queue
cppreference.com
<queue> 에 정의되어 있음.
|
||
template< class T, |
||
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 heap in some random access container, with the benefit of not being able to accidentally invalidate the heap.
목차 |
[편집] Member types
Member type | Definition |
container_type
|
Container
|
value_type
|
Container::value_type
|
size_type
|
Container::size_type
|
reference
|
Container::reference
|
const_reference
|
Container::const_reference
|
[편집] Member functions
priority_queue 의 생성자이다. (public member function) | |
priority_queue 의 소멸자이다. (public member function) | |
컨테이너 어댑터에 값을 할당한다. (public member function) | |
Element access | |
access the top element (public member function) | |
Capacity | |
현재 컨테이너가 비어있는지 확인한다. (public member function) | |
원소의 개수를 반환한다. (public member function) | |
Modifiers | |
inserts element and sorts the underlying container (public member function) | |
(C++11) |
원소를 바로 만들어 삽입한 후 컨테이너를 정렬한다. (public member function) |
removes the first element (public member function) | |
원소들을 서로 바꾼다 (public member function) | |
Member objects | |
Container c |
the underlying container (protected member object) |
Compare comp |
the comparison function object (protected member object) |
[편집] Non-member functions
specializes the std::swap algorithm (function template) |
[편집] Helper classes
specializes the std::uses_allocator type trait (function template) |