OnlineWoerterBuecher.de
Internes

Lexikon


heap


1. An area of memory used for {dynamic memory allocation} where blocks of memory are allocated and freed in an arbitrary order and the pattern of allocation and size of blocks is not known until ref="module.php?name=Lexikon&file=search&eid=1&query=run time">run time. Typically, a program has one heap which it may use for several different purposes. Heap is required by languages in which functions can return arbitrary data structures or functions with ref="module.php?name=Lexikon&file=search&eid=1&query=free variables">free variables (see ref="module.php?name=Lexikon&file=search&eid=1&query=closure">closure). In ref="module.php?name=Lexikon&file=search&eid=1&query=C">C functions ref="module.php?name=Lexikon&file=search&eid=1&query=malloc">malloc and ref="module.php?name=Lexikon&file=search&eid=1&query=free">free provide access to the heap. Contrast ref="module.php?name=Lexikon&file=search&eid=1&query=stack">stack. See also ref="module.php?name=Lexikon&file=search&eid=1&query=dangling pointer">dangling pointer. 2. A data structure with its elements partially ordered (sorted) such that finding either the minimum or the maximum (but not both) of the elements is computationally inexpensive (independent of the number of elements), while both adding a new item and finding each subsequent smallest/largest element can be done in O(log n) time, where n is the number of elements. Formally, a heap is a ref="module.php?name=Lexikon&file=search&eid=1&query=binary tree">binary tree with a key in each ref="module.php?name=Lexikon&file=search&eid=1&query=node">node, such that all the ref="module.php?name=Lexikon&file=search&eid=1&query=leaves">leaves of the tree are on two adjacent levels all leaves on the lowest level occur to the left and all levels, except possibly the lowest, are filled and the key in the ref="module.php?name=Lexikon&file=search&eid=1&query=root">root is at least as large as the keys in its children (if any), and the left and right subtrees (if they exist) are again heaps. Note that the last condition assumes that the goal is finding the minimum quickly. Heaps are often implemented as one-dimensional ref="module.php?name=Lexikon&file=search&eid=1&query=arrays">arrays. Still assuming that the goal is finding the minimum quickly the ref="module.php?name=Lexikon&file=search&eid=1&query=invariant">invariant is heap[i] <= heap[2*i] and heap[i] <= heap[2*i+1] for all i, where heap[i] denotes the i-th element, heap[1] being the first. Heaps can be used to implement ref="module.php?name=Lexikon&file=search&eid=1&query=priority queues">priority queues or in ref="module.php?name=Lexikon&file=search&eid=1&query=sort">sort algorithms. (1996-02-26)

In addition suitable contents:
[ ref="module.php?name=Lexikon&op=content&tid=31">2 ] [ ref="module.php?name=Lexikon&op=content&tid=134">= ] [ ref="module.php?name=Lexikon&op=content&tid=262">ad ] [ ref="module.php?name=Lexikon&op=content&tid=320">adjacent ] [ ref="module.php?name=Lexikon&op=content&tid=396">ag ] [ ref="module.php?name=Lexikon&op=content&tid=411">ai ] [ ref="module.php?name=Lexikon&op=content&tid=433">al ] [ ref="module.php?name=Lexikon&op=content&tid=492">algorithm ] [ ref="module.php?name=Lexikon&op=content&tid=544">am ] [ ref="module.php?name=Lexikon&op=content&tid=592">an ] [ ref="module.php?name=Lexikon&op=content&tid=740">ar ] [ ref="module.php?name=Lexikon&op=content&tid=743">arc ] [ ref="module.php?name=Lexikon&op=content&tid=759">arg ] [ ref="module.php?name=Lexikon&op=content&tid=784">array ] [ ref="module.php?name=Lexikon&op=content&tid=800">as ] [ ref="module.php?name=Lexikon&op=content&tid=894">at ] [ ref="module.php?name=Lexikon&op=content&tid=996">av ] [ ref="module.php?name=Lexikon&op=content&tid=1026">b ] [ ref="module.php?name=Lexikon&op=content&tid=1181">be ] [ ref="module.php?name=Lexikon&op=content&tid=1269">bi ] [ ref="module.php?name=Lexikon&op=content&tid=1298">binary ] [ ref="module.php?name=Lexikon&op=content&tid=1309">binary tree ] [ ref="module.php?name=Lexikon&op=content&tid=1334">bit ] [ ref="module.php?name=Lexikon&op=content&tid=1402">block ] [ ref="module.php?name=Lexikon&op=content&tid=1444">bo ] [ ref="module.php?name=Lexikon&op=content&tid=1501">bot ] [ ref="module.php?name=Lexikon&op=content&tid=1606">bs ] [ ref="module.php?name=Lexikon&op=content&tid=1624">bt ] [ ref="module.php?name=Lexikon&op=content&tid=1695">by ] [ ref="module.php?name=Lexikon&op=content&tid=1708">C ] [ ref="module.php?name=Lexikon&op=content&tid=1724">ca ] [ ref="module.php?name=Lexikon&op=content&tid=1863">cat ] [ ref="module.php?name=Lexikon&op=content&tid=1896">cc ] [ ref="module.php?name=Lexikon&op=content&tid=2001">ch ] [ ref="module.php?name=Lexikon&op=content&tid=2059">child ] [ ref="module.php?name=Lexikon&op=content&tid=2136">ck ] [ ref="module.php?name=Lexikon&op=content&tid=2138">cl ] [ ref="module.php?name=Lexikon&op=content&tid=2199">closure ] [ ref="module.php?name=Lexikon&op=content&tid=2247">co ] [ ref="module.php?name=Lexikon&op=content&tid=2330">com ] [ ref="module.php?name=Lexikon&op=content&tid=2545">con ] [ ref="module.php?name=Lexikon&op=content&tid=2900">cu ] [ ref="module.php?name=Lexikon&op=content&tid=2991">dangling pointer ] [ ref="module.php?name=Lexikon&op=content&tid=3006">data ] [ ref="module.php?name=Lexikon&op=content&tid=3084">data structure ] [ ref="module.php?name=Lexikon&op=content&tid=3136">dd ] [ ref="module.php?name=Lexikon&op=content&tid=3151">de ] [ ref="module.php?name=Lexikon&op=content&tid=3371">diff ] [ ref="module.php?name=Lexikon&op=content&tid=3436">ding ] [ ref="module.php?name=Lexikon&op=content&tid=3528">dj ] [ ref="module.php?name=Lexikon&op=content&tid=3565">do ] [ ref="module.php?name=Lexikon&op=content&tid=3752">du ] [ ref="module.php?name=Lexikon&op=content&tid=3896">ed ] [ ref="module.php?name=Lexikon&op=content&tid=3929">ee ] [ ref="module.php?name=Lexikon&op=content&tid=4008">element ] [ ref="module.php?name=Lexikon&op=content&tid=4148">er ] [ ref="module.php?name=Lexikon&op=content&tid=4150">era ] [ ref="module.php?name=Lexikon&op=content&tid=4171">es ] [ ref="module.php?name=Lexikon&op=content&tid=4199">et ] [ ref="module.php?name=Lexikon&op=content&tid=4497">fi ] [ ref="module.php?name=Lexikon&op=content&tid=4520">file ] [ ref="module.php?name=Lexikon&op=content&tid=4700">fo ] [ ref="module.php?name=Lexikon&op=content&tid=4727">for ] [ ref="module.php?name=Lexikon&op=content&tid=4828">fr ] [ ref="module.php?name=Lexikon&op=content&tid=4859">free ] [ ref="module.php?name=Lexikon&op=content&tid=4867">free variable ] [ ref="module.php?name=Lexikon&op=content&tid=4940">function ] [ ref="module.php?name=Lexikon&op=content&tid=4989">ga ] [ ref="module.php?name=Lexikon&op=content&tid=5057">ge ] [ ref="module.php?name=Lexikon&op=content&tid=5134">gh ] [ ref="module.php?name=Lexikon&op=content&tid=5171">gl ] [ ref="module.php?name=Lexikon&op=content&tid=5237">goal ] [ ref="module.php?name=Lexikon&op=content&tid=5291">gr ] [ ref="module.php?name=Lexikon&op=content&tid=5403">gu ] [ ref="module.php?name=Lexikon&op=content&tid=5434">h ] [ ref="module.php?name=Lexikon&op=content&tid=5540">hat ] [ ref="module.php?name=Lexikon&op=content&tid=5675">hm ] [ ref="module.php?name=Lexikon&op=content&tid=5768">hr ] [ ref="module.php?name=Lexikon&op=content&tid=5779">ht ] [ ref="module.php?name=Lexikon&op=content&tid=5931">id ] [ ref="module.php?name=Lexikon&op=content&tid=5986">iff ] [ ref="module.php?name=Lexikon&op=content&tid=6013">il ] [ ref="module.php?name=Lexikon&op=content&tid=6064">in ] [ ref="module.php?name=Lexikon&op=content&tid=6194">int ] [ ref="module.php?name=Lexikon&op=content&tid=6406">invariant ] [ ref="module.php?name=Lexikon&op=content&tid=6413">io ] [ ref="module.php?name=Lexikon&op=content&tid=6449">ir ] [ ref="module.php?name=Lexikon&op=content&tid=6482">is ] [ ref="module.php?name=Lexikon&op=content&tid=6558">it ] [ ref="module.php?name=Lexikon&op=content&tid=6789">ke ] [ ref="module.php?name=Lexikon&op=content&tid=6802">key ] [ ref="module.php?name=Lexikon&op=content&tid=6861">kn ] [ ref="module.php?name=Lexikon&op=content&tid=6918">la ] [ ref="module.php?name=Lexikon&op=content&tid=6950">language ] [ ref="module.php?name=Lexikon&op=content&tid=7023">ld ] [ ref="module.php?name=Lexikon&op=content&tid=7049">leaves ] [ ref="module.php?name=Lexikon&op=content&tid=7091">Lex ] [ ref="module.php?name=Lexikon&op=content&tid=7107">li ] [ ref="module.php?name=Lexikon&op=content&tid=7281">location ] [ ref="module.php?name=Lexikon&op=content&tid=7399">ls ] [ ref="module.php?name=Lexikon&op=content&tid=7441">ly ] [ ref="module.php?name=Lexikon&op=content&tid=7463">ma ] [ ref="module.php?name=Lexikon&op=content&tid=7579">mall ] [ ref="module.php?name=Lexikon&op=content&tid=7580">malloc ] [ ref="module.php?name=Lexikon&op=content&tid=7749">memory ] [ ref="module.php?name=Lexikon&op=content&tid=8019">mm ] [ ref="module.php?name=Lexikon&op=content&tid=8032">mo ] [ ref="module.php?name=Lexikon&op=content&tid=8040">mod ] [ ref="module.php?name=Lexikon&op=content&tid=8079">module ] [ ref="module.php?name=Lexikon&op=content&tid=8167">mp ] [ ref="module.php?name=Lexikon&op=content&tid=8228">ms ] [ ref="module.php?name=Lexikon&op=content&tid=8258">mu ] [ ref="module.php?name=Lexikon&op=content&tid=8384">N ] [ ref="module.php?name=Lexikon&op=content&tid=8386">na ] [ ref="module.php?name=Lexikon&op=content&tid=8460">nc ] [ ref="module.php?name=Lexikon&op=content&tid=8472">ne ] [ ref="module.php?name=Lexikon&op=content&tid=8627">ng ] [ ref="module.php?name=Lexikon&op=content&tid=8630">ni ] [ ref="module.php?name=Lexikon&op=content&tid=8675">no ] [ ref="module.php?name=Lexikon&op=content&tid=8680">node ] [ ref="module.php?name=Lexikon&op=content&tid=8760">ns ] [ ref="module.php?name=Lexikon&op=content&tid=8787">nu ] [ ref="module.php?name=Lexikon&op=content&tid=8820">O ] [ ref="module.php?name=Lexikon&op=content&tid=8964">om ] [ ref="module.php?name=Lexikon&op=content&tid=9204">pa ] [ ref="module.php?name=Lexikon&op=content&tid=9457">pe ] [ ref="module.php?name=Lexikon&op=content&tid=9550">ph ] [ ref="module.php?name=Lexikon&op=content&tid=9651">pl ] [ ref="module.php?name=Lexikon&op=content&tid=9762">point ] [ ref="module.php?name=Lexikon&op=content&tid=9766">pointer ] [ ref="module.php?name=Lexikon&op=content&tid=9908">pr ] [ ref="module.php?name=Lexikon&op=content&tid=9973">priority queue ] [ ref="module.php?name=Lexikon&op=content&tid=10023">program ] [ ref="module.php?name=Lexikon&op=content&tid=10042">programming ] [ ref="module.php?name=Lexikon&op=content&tid=10144">pt ] [ ref="module.php?name=Lexikon&op=content&tid=10253">query ] [ ref="module.php?name=Lexikon&op=content&tid=10259">queue ] [ ref="module.php?name=Lexikon&op=content&tid=10364">rc ] [ ref="module.php?name=Lexikon&op=content&tid=10385">re ] [ ref="module.php?name=Lexikon&op=content&tid=10767">ro ] [ ref="module.php?name=Lexikon&op=content&tid=10789">root ] [ ref="module.php?name=Lexikon&op=content&tid=10887">ru ] [ ref="module.php?name=Lexikon&op=content&tid=10892">run ] [ ref="module.php?name=Lexikon&op=content&tid=10898">run time ] [ ref="module.php?name=Lexikon&op=content&tid=10918">S ] [ ref="module.php?name=Lexikon&op=content&tid=11150">se ] [ ref="module.php?name=Lexikon&op=content&tid=11376">si ] [ ref="module.php?name=Lexikon&op=content&tid=11556">sm ] [ ref="module.php?name=Lexikon&op=content&tid=11651">so ] [ ref="module.php?name=Lexikon&op=content&tid=11737">sort ] [ ref="module.php?name=Lexikon&op=content&tid=11934">st ] [ ref="module.php?name=Lexikon&op=content&tid=11939">stack ] [ ref="module.php?name=Lexikon&op=content&tid=12109">struct ] [ ref="module.php?name=Lexikon&op=content&tid=12133">su ] [ ref="module.php?name=Lexikon&op=content&tid=12165">sum ] [ ref="module.php?name=Lexikon&op=content&tid=12359">T ] [ ref="module.php?name=Lexikon&op=content&tid=12588">th ] [ ref="module.php?name=Lexikon&op=content&tid=12721">to ] [ ref="module.php?name=Lexikon&op=content&tid=12787">tr ] [ ref="module.php?name=Lexikon&op=content&tid=12844">tree ] [ ref="module.php?name=Lexikon&op=content&tid=12896">tt ] [ ref="module.php?name=Lexikon&op=content&tid=12939">tw ] [ ref="module.php?name=Lexikon&op=content&tid=12986">ua ] [ ref="module.php?name=Lexikon&op=content&tid=13030">um ] [ ref="module.php?name=Lexikon&op=content&tid=13175">us ] [ ref="module.php?name=Lexikon&op=content&tid=13252">va ] [ ref="module.php?name=Lexikon&op=content&tid=13274">var ] [ ref="module.php?name=Lexikon&op=content&tid=13275">variable ] [ ref="module.php?name=Lexikon&op=content&tid=13310">ve ] [ ref="module.php?name=Lexikon&op=content&tid=13366">vi ] [ ref="module.php?name=Lexikon&op=content&tid=13694">while ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (8605 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.0998 Seconds, with 16 Database-Queries
Zurück zur Startseite