Struct radix_heap::RadixHeapMap [] [src]

pub struct RadixHeapMap<K, V> { /* fields omitted */ }

A montone priority queue implemented with a radix heap.

This will be a max-heap.

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.

Methods

impl<K: Radix + Ord + Copy, V> RadixHeapMap<K, V>
[src]

[src]

Create an empty RadixHeapMap

[src]

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.

[src]

Drops all items form the RadixHeapMap and sets the top key to None.

[src]

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 minimum bound of the items being pushed to the heap.

[src]

Pushes a new key value pair onto the heap.

Panics

Panics if the key is more than the current top key.

[src]

Sets the top value to the current maximum key value in the heap

[src]

Pops the largest element of the heap. This may increase the top value.

[src]

Returns the number of elements in the heap

[src]

Returns true if there is no elements in the heap

[src]

The current top value. All keys pushed onto the heap must be smaller than this value.

[src]

Discards as much additional capacity as possible.

Trait Implementations

impl<K: Clone, V: Clone> Clone for RadixHeapMap<K, V>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<K: Radix + Ord + Copy, V> Default for RadixHeapMap<K, V>
[src]

[src]

Returns the "default value" for a type. Read more

impl<K: Radix + Ord + Copy, V> FromIterator<(K, V)> for RadixHeapMap<K, V>
[src]

[src]

Creates a value from an iterator. Read more

impl<K: Radix + Ord + Copy, V> Extend<(K, V)> for RadixHeapMap<K, V>
[src]

[src]

Extends a collection with the contents of an iterator. Read more

impl<'a, K: Radix + Ord + Copy + 'a, V: Copy + 'a> Extend<&'a (K, V)> for RadixHeapMap<K, V>
[src]

[src]

Extends a collection with the contents of an iterator. Read more

impl<K: Debug, V: Debug> Debug for RadixHeapMap<K, V>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

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