Struct radix_heap::RadixHeapMap [−][src]
pub struct RadixHeapMap<K, V> { /* fields omitted */ }
Expand description
A montone priority queue implemented using a radix heap.
This will be a max-heap.
See the module documentation for more information.
It is a logic error for a key to be modified in such a way that the
item’s ordering relative to any other item, as determined by the Ord
trait, changes while it is in the heap. This is normally only possible
through Cell
, RefCell
, global state, I/O, or unsafe code.
Implementations
Create an empty RadixHeapMap
Create an empty RadixHeapMap
with the top key set to a specific
value.
This can be more efficient if you have a known minimum bound of the items being pushed to the heap.
Drop all items from the RadixHeapMap
and sets the top key to a
specific value.
This can be more efficient if you have a known maximum bound of the items being pushed to the heap.
Pushes a new key value pair onto the heap.
Panics
Panics if the key is larger than the current top key.
Remove the greatest element from the heap and returns it, or None
if
empty.
If there is a tie between multiple elements, the last inserted element will be popped first.
This will set the top key to the extracted key.
The current top value. All keys pushed onto the heap must be smaller than this value.
Discards as much additional capacity as possible.
Returns an iterator of all key-value pairs in the RadixHeapMap in arbitrary order
Returns an iterator of all keys in the RadixHeapMap in arbitrary order
Trait Implementations
Returns the “default value” for a type. Read more
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Creates a value from an iterator. Read more
Auto Trait Implementations
impl<K, V> RefUnwindSafe for RadixHeapMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for RadixHeapMap<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for RadixHeapMap<K, V> where
K: Sync,
V: Sync,
impl<K, V> Unpin for RadixHeapMap<K, V> where
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for RadixHeapMap<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more