[][src]Trait dary_heap::Arity

pub trait Arity {
    const D: usize;
}

Marker to specify arity d in a d-ary heap.

Validity of arities in d-ary heaps

Only arities of two or greater are useful in d-ary heap, and are therefore the only ones implemented by default. Lower arities are only possible if you put in the effort to implement them yourself. An arity of one is possible, but yields a heap where every element has one child. This essentially makes it a sorted vector with poor performance. Regarding an arity of zero: this is not statically prevented, but constructing a DaryHeap with it and using it may (and probably will) result in a runtime panic.

Associated Constants

const D: usize

The value of d.

Loading content...

Implementors

impl Arity for D2[src]

impl Arity for D3[src]

impl Arity for D4[src]

impl Arity for D5[src]

impl Arity for D6[src]

impl Arity for D7[src]

impl Arity for D8[src]

Loading content...