이름공간
변수
행위

std::priority_queue

cppreference.com
< cpp‎ | container
<queue> 에 정의되어 있음.
template<

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

>class priority_queue;

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_typeContainer[edit]
value_typeContainer::value_type[edit]
size_typeContainer::size_type[edit]
referenceContainer::reference[edit]
const_referenceContainer::const_reference[edit]

[편집]Member functions

priority_queue의 생성자이다.
(public member function)[edit]
priority_queue의 소멸자이다.
(public member function)[edit]
컨테이너 어댑터에 값을 할당한다.
(public member function)[edit]
Element access
access the top element
(public member function)[edit]
Capacity
현재 컨테이너가 비어있는지 확인한다.
(public member function)[edit]
원소의 개수를 반환한다.
(public member function)[edit]
Modifiers
inserts element and sorts the underlying container
(public member function)[edit]
(C++11)
원소를 바로 만들어 삽입한 후 컨테이너를 정렬한다.
(public member function)[edit]
removes the first element
(public member function)[edit]
원소들을 서로 바꾼다
(public member function)[edit]

Member objects

Container c
the underlying container
(protected member object)[edit]
Compare comp
the comparison function object
(protected member object)

[편집]Non-member functions

specializes the std::swap algorithm
(function template)[edit]

[편집]Helper classes

specializes the std::uses_allocator type trait
(function template)[edit]
close