[][src]Trait r3::utils::binary_heap::BinaryHeap

pub trait BinaryHeap: VecLike {
    pub fn heap_pop(
        &mut self,
        ctx: impl BinaryHeapCtx<Self::Element>
    ) -> Option<Self::Element>;
pub fn heap_remove(
        &mut self,
        i: usize,
        ctx: impl BinaryHeapCtx<Self::Element>
    ) -> Option<Self::Element>;
pub fn heap_push(
        &mut self,
        item: Self::Element,
        ctx: impl BinaryHeapCtx<Self::Element>
    ) -> usize; }

Min-heap.

Required methods

pub fn heap_pop(
    &mut self,
    ctx: impl BinaryHeapCtx<Self::Element>
) -> Option<Self::Element>
[src]

Remove the least item from the heap and return it.

pub fn heap_remove(
    &mut self,
    i: usize,
    ctx: impl BinaryHeapCtx<Self::Element>
) -> Option<Self::Element>
[src]

Remove the item at the specified position and return it.

pub fn heap_push(
    &mut self,
    item: Self::Element,
    ctx: impl BinaryHeapCtx<Self::Element>
) -> usize
[src]

Push an item onto the heap and return its position.

Loading content...

Implementors

impl<T: VecLike> BinaryHeap for T[src]

Loading content...