Next: binary heaps inspection, Up: binary heaps [Index]
The following bindings are exported by the library (vicare
containers binary-heaps)
. The bindings whose name is prefixed with
$
are unsafe operations: they do not validate their
arguments before accessing them.
Record type representing a binary heap object. The
<binary-heap>
type is non–generative and available for
subtyping. In this documentation <binary-heap>
object
arguments to functions are indicated as heap.
Build and return a new instance of <binary-heap>
. item<
must be a procedure implementing a “less than” comparison predicate.
The optional initial-array-size must be a non–negative fixnum
representing the initial size of the underlying vector used as storage
for the heap implementation.
Return #t
if obj is a record of type <binary-heap>
;
otherwise return #f
.
Add a new property key to the property list of heap; key must be a symbol. If key is already set: the old entry is mutated to reference the new value.
Return the value of the property key in the property list of
heap; if key is not set: return #f
. key must be
a symbol.
Remove the property key from the property list of heap; if key is not set: nothing happens. key must be a symbol.
Return a new association list representing the property list of heap. The order of the entries is the same as the property creation order.
Return an exact integer to be used as hashtable key for heap.
Hashtables having a <binary-heap>
as key can be instantiated as
follows:
(make-hashtable binary-heap-hash eq?)
Next: binary heaps inspection, Up: binary heaps [Index]