A radix heap is a
data structure
In computer science, a data structure is a data organization, management, and storage format that is usually chosen for Efficiency, efficient Data access, access to data. More precisely, a data structure is a collection of data values, the rel ...
for realizing the operations of a
monotone priority queue
In computer science, a monotone priority queue is a variant of the priority queue abstract data type in which the priorities of extracted items are required to form a monotonic sequence. That is, for a priority queue in which each successively extr ...
. A set of elements to which a key is assigned can then be managed. The run time of the operations depends on the difference between the largest and smallest key or constant. The data structure consists mainly of a series of buckets, the size of which increases
exponentially
Exponential may refer to any of several mathematical topics related to exponentiation, including:
*Exponential function, also:
**Matrix exponential, the matrix analogue to the above
*Exponential decay, decrease at a rate proportional to value
* Exp ...
.
Prerequisites
# all keys are
natural numbers
In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country").
Numbers used for counting are called '' cardinal ...
;
# max. key - min. key
C for constant C;
# the
''extract-min'' operation is monotonic; that is, the values returned by successive ''extract-min'' calls are
monotonically increasing
In mathematics, a monotonic function (or monotone function) is a function between ordered sets that preserves or reverses the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of ord ...
.
Description of data structure
The three most important
fields are:
#
of size
, with 0 as the lowest index, stores the buckets;
#
of size
, with 0 as the lowest index, store the (lower) bounds of the buckets;
#
, holds for each element
in the heap the bucket in which it is stored.
The above diagram shows the data structure. The following invariants apply:
#
key in