std::priority_queue
De 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. |
Déclaré dans l'en-tête <queue>
|
||
template< class T, |
||
File d'attente de priorité est un conteneur qui permet de constante de temps maximale (ou minimale, en fonction de
Compare
) extraction au détriment de l'insertion logarithmique. Travailler avec un priority_queue
est similaire à la gestion d'un tas dans certains conteneurs à accès aléatoire, avec l'avantage de ne pas être en mesure d'invalider accidentellement le tas .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 tas 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.
[modifier] Types de membres
Type du membre | Définition |
container_type
|
Container
|
value_type
|
Container::value_type
|
size_type
|
Container::size_type
|
reference
|
Container::reference
|
const_reference
|
Container::const_reference
|
[modifier] Fonctions membres
Construit le priority_queue (fonction membre publique) | |
détruit le priority_queue (fonction membre publique) | |
Attribue les valeurs dans l'adaptateur de conteneur (fonction membre publique) | |
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. | |
accéder à l'élément supérieur 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. (fonction membre publique) | |
Original: Capacity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
vérifie si le conteneur sous-jacent est vide 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. (fonction membre publique) | |
retourne le nombre d'éléments 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. (fonction membre publique) | |
Original: Modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
élément inserts et trie le conteneur sous-jacent Original: inserts element and sorts 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. (fonction membre publique) | |
(C++11) |
construit des éléments en mémoire et trie le conteneur sous-jacent (fonction membre publique) |
supprime le premier élément 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. (fonction membre publique) | |
permute les contenus 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. (fonction membre publique) | |
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 |
le conteneur sous-jacent 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. (objet membre protégé) |
Compare comp |
l'objet fonction de comparaison 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. (objet membre protégé) |
[modifier] Fonctions annexes
l'algorithme spécialisé 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. (fonction générique) |
[modifier] Classes d'aide
se spécialise le trait de type 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. (fonction générique) |