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. |
| Заголовочный файл <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. (public функция-член) | |
destructs the priority_queue (public функция-член) | |
| Шаблон:tlist frontr (public функция-член) | |
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. (public функция-член) | |
Original: Capacity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| проверяет отсутствие элементов в контейенре, используемом для реализации (public функция-член) | |
| возвращает количество элементов 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. (public функция-член) | |
Original: Modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| вставляет элемент и сортирует базовый контейнер (public функция-член) | |
| (C++11) |
конструирует элемент "на месте" и сортирует базовый контейнер (public функция-член) |
| удаляет первый элемент 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. (public функция-член) | |
| обмениевает содержимое (public функция-член) | |
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. (protected объект-член) |
| 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. (protected объект-член) |
[править] Не являющиеся членами функций
| Специализируется 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. (шаблон функции) | |
[править] Вспомогательные классы
| Специализируется черта 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. (шаблон функции) | |