C++ Reference: class PriorityQueueWithRestrictedPush
Note: This documentation is automatically generated.
Method |
Clear | Return type: void Clears the queue.
|
IsEmpty | Return type: bool Is the queue empty?
|
Pop | Return type: Element Returns the element with highest priority and remove it from the queue.
IsEmpty() must be false, this condition is DCHECKed.
|
PriorityQueueWithRestrictedPush | |
Push | Return type: void Arguments: Element element, IntegerPriority priority Push a new element in the queue. Its priority must be greater or equal to
the highest priority present in the queue, minus one. This condition is
DCHECKed, and violating it yields erroneous queue behavior in NDEBUG mode.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[[["`PriorityQueueWithRestrictedPush` is a C++ class offering a priority queue implementation with specific restrictions on element insertion."],["The queue allows pushing elements only if their priority is within a certain range relative to the current highest priority."],["Core functionalities include `Push`, `Pop`, `IsEmpty`, and `Clear` for managing elements and queue state."],["`Pop` retrieves and removes the highest priority element, while `IsEmpty` checks if the queue is empty."],["The `Clear` method resets the queue to an empty state."]]],[]]