[−][src]Trait dary_heap::Arity
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.