翻訳と辞書
Words near each other
・ Quealy
・ Queanbeyan
・ Queanbeyan Blues
・ Queanbeyan City FC
・ Queanbeyan District Cricket Club
・ Queanbeyan District Hospital
・ Queanbeyan East, New South Wales
・ Queanbeyan Football Club
・ Queanbeyan High School
・ Queanbeyan Nature Reserve
・ Queanbeyan Parish
・ Queanbeyan railway station
・ Queanbeyan River
・ Queanbeyan West, New South Wales
・ Queanbeyan Whites
Queap
・ Queas and Art
・ Queaux
・ Quebec
・ Quebec & Ontario Transportation Company
・ Quebec (1951 film)
・ Quebec (AG) v Blaikie (No 1)
・ Quebec (AG) v Canada (AG)
・ Quebec (AG) v Canadian Owners and Pilots Assn
・ Quebec (AG) v Kellogg's Co of Canada
・ Quebec (AG) v Lacombe
・ Quebec (album)
・ Quebec (census division)
・ Quebec (Commission des droits de la personne et des droits de la jeunesse) v Boisbriand (City of)
・ Quebec (disambiguation)


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Queap : ウィキペディア英語版
Queap

In computer science, a queap is a priority queue data structure. The data structure allows insertions and deletions of arbitrary elements, as well as retrieval of the highest-priority element. Each deletion takes amortized time logarithmic in the number of items that have been in the structure for a longer time than the removed item. Insertions take constant amortized time.
The data structure consists of a doubly linked list and a 2-4 tree data structure, each modified to keep track of its minimum-priority element.
The basic operation of the structure is to keep newly inserted elements in the doubly linked list, until a deletion would remove one of the list items, at which point they are all moved into the 2-4 tree. The 2-4 tree stores its elements in insertion order, rather than the more conventional priority-sorted order.
Both the data structure and its name were devised by John Iacono and Stefan Langerman.
==Description==

A queap is a priority queue that inserts elements in O(1) amortized time, and removes the minimum element in O(log(''k'' + 2)) if there are ''k'' items that have been in the heap for a longer time than the element to be extracted. The queap has a property called the queueish property: the time to search for element ''x'' is O(lg ''q''(''x'')) where ''q''(''x'') is equal to ''n'' − 1 − ''w''(''x'') and ''w''(''x'') is the number of distinct items that has been accessed by operations such as searching, inserting, or deleting. ''q''(''x'') is defined as how many elements have not been accessed since ''x'''s last access. Indeed, the queueish property is the complement of the splay tree working set property: the time to search for element ''x'' is O(lg ''w''(''x'')).
A queap can be represented by two data structures: a doubly linked list and a modified version of 2-4 tree. The doubly linked list, ''L'', is used for a series of insert and locate-min operations. The queap keeps a pointer to the minimum element stored in the list. To add element ''x'' to list ''l'', the element ''x'' is added to the end of the list and a bit variable in element ''x'' is set to one. This operation is done to determine if the element is either in the list or in a 2-4 tree.
A 2-4 tree is used when a delete operation occurs. If the item ''x'' is already in tree ''T'', the item is removed using the 2-4 tree delete operation. Otherwise, the item ''x'' is in list ''L'' (done by checking if the bit variable is set). All the elements stored in list ''L'' are then added to the 2-4 tree, setting the bit variable of each element to zero. ''x'' is then removed from ''T''.
A queap uses only the 2-4 tree structure properties, not a search tree. The modified 2-4 tree structure is as follows. Suppose list ''L'' has the following set of elements: x_1, x_2, x_3, \dots , x_k. When the deletion operation is invoked, the set of elements stored in ''L'' is then added to the leaves of the 2-4 tree in that order, proceeded by a dummy leaf containing an infinite key. Each internal node of ''T'' has a pointer h_v, which points to the smallest item in subtree ''v''. Each internal node on path ''P'' from the root to x_0 has a pointer c_v, which points to the smallest key in T - T_v - \. The h_v pointers of each internal node on path ''P'' are ignored. The queap has a pointer to c_, which points to the smallest element in ''T''.
An application of queaps includes a unique set of high priority events and extraction of the highest priority event for processing.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Queap」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.