Struct libreal::heap::Heap [] [src]

pub struct Heap<Arity: Unsigned, Rel: TotalOrderRelation<T>, T>(_, _);

Methods

impl<Arity: Unsigned, Rel: TotalOrderRelation<T>, T> Heap<Arity, Rel, T>
[src]

fn new() -> Self

fn with_capacity(cap: usize) -> Option<Self>

fn length(&self) -> usize

fn capacity(&self) -> usize

fn reserve(&mut self, n_more: usize) -> bool

fn from_vec(v: Vec<T>) -> Self

fn push(&mut self, x: T) -> Result<(), T>

fn pop(&mut self) -> Option<T>

fn peek(&self) -> Option<&T>

fn push_pop(&mut self, x: T) -> T

Pops the root and inserts the given value. xs being empty is an error.

fn into_vec(self) -> Vec<T>

fn into_sorted_vec(self) -> Vec<T>