14 lines
505 B
Rust
14 lines
505 B
Rust
/// Data structures for the "pure" min-queues, supporting duplicates but no arbitrary updates
|
|
pub mod binary_heap;
|
|
|
|
/// A data structure usable for backing a "pure" queue
|
|
pub trait PureBacking<T: Ord> {
|
|
/// Instantiates a new data structure
|
|
fn new() -> Self;
|
|
/// Places an item into the queue
|
|
fn add(&mut self, item: T);
|
|
/// Removes the item with minimum priority, if it exists
|
|
fn pop(&mut self) -> Option<T>;
|
|
/// The number of items in the queue
|
|
fn len(&self) -> usize;
|
|
}
|