orx-priority-queue 0.3.3

Priority queue traits, d-ary heap implementations having binary heap as a special case.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use orx_priority_queue::PriorityQueue;

pub fn test_is_empty<P>(mut pq: P)
where
    P: PriorityQueue<usize, f64>,
{
    pq.clear();
    assert!(pq.is_empty());

    pq.push(0, 0f64);
    assert!(!pq.is_empty());

    pq.pop();
    assert!(pq.is_empty());
}