[][src]Struct algorithms_edu::data_structures::priority_queue::binary_heap::BinaryHeap

pub struct BinaryHeap<T: PartialOrd> { /* fields omitted */ }

Implementations

impl<T: PartialOrd> BinaryHeap<T>[src]

pub fn swap(&mut self, i: usize, j: usize)[src]

Trait Implementations

impl<T: PartialOrd> PriorityQueue<T> for BinaryHeap<T>[src]

pub fn insert(&mut self, el: T)[src]

Adds an element to the priority queue, O(log(n))

pub fn contains(&self, el: &T) -> bool[src]

Test if an element is in heap, O(n)

pub fn remove(&mut self, el: &T)[src]

Removes a particular element in the heap, O(n)

pub fn poll(&mut self) -> Option<T>[src]

Removes the root of the heap, O(log(n))

Auto Trait Implementations

impl<T> RefUnwindSafe for BinaryHeap<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for BinaryHeap<T> where
    T: Send
[src]

impl<T> Sync for BinaryHeap<T> where
    T: Sync
[src]

impl<T> Unpin for BinaryHeap<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for BinaryHeap<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,