pub struct RadixHeapU64<T> {
buckets: [Vec<(u64, T)>; 65],
last: u64,
len: usize,
}Expand description
A min-priority queue whose removed keys are monotonically nondecreasing.
Values with equal keys have no specified removal order.
Fields§
§buckets: [Vec<(u64, T)>; 65]§last: u64§len: usizeImplementations§
Source§impl<T> RadixHeapU64<T>
impl<T> RadixHeapU64<T>
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn push(&mut self, key: u64, value: T)
pub fn push(&mut self, key: u64, value: T)
Inserts a value whose key is not less than the key most recently removed.
§Panics
Panics if key is less than the key most recently removed.
pub fn pop(&mut self) -> Option<(u64, T)>
pub fn clear(&mut self)
fn bucket_index(key: u64, last: u64) -> usize
Trait Implementations§
Source§impl<T: Clone> Clone for RadixHeapU64<T>
impl<T: Clone> Clone for RadixHeapU64<T>
Source§impl<T: Debug> Debug for RadixHeapU64<T>
impl<T: Debug> Debug for RadixHeapU64<T>
Auto Trait Implementations§
impl<T> Freeze for RadixHeapU64<T>
impl<T> RefUnwindSafe for RadixHeapU64<T>
impl<T> Send for RadixHeapU64<T>
impl<T> Sync for RadixHeapU64<T>
impl<T> Unpin for RadixHeapU64<T>
impl<T> UnsafeUnpin for RadixHeapU64<T>
impl<T> UnwindSafe for RadixHeapU64<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more