orx-priority-queue 1.8.0

Priority queue traits and high performance d-ary heap implementations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub(crate) trait HeapPositions<N>: Clone {
    fn contains(&self, node: &N) -> bool;

    fn position_of(&self, node: &N) -> Option<usize>;

    fn clear(&mut self);

    fn insert(&mut self, node: &N, position: usize);

    fn remove(&mut self, node: &N);

    fn update_position_of(&mut self, node: &N, position: usize);

    #[cfg(test)]
    fn is_valid<K>(&self, offset: usize, tree: &[(N, K)]) -> bool;
}

pub(crate) trait HeapPositionsDecKey<N>: HeapPositions<N> {}