In computer science, the VList is a persistent data structure designed by Phil Bagwell in 2002 that combines the fast indexing of arrays with the easy extension of cons-based (or singly-linked) linked lists. Like arrays, VLists have constant-time lookup on average and are highly compact, requiring only O(log n) storage for pointers, allowing them to take advantage of locality of reference.
| Property | Value |
| dbpprop:abstract
|
- In computer science, the VList is a persistent data structure designed by Phil Bagwell in 2002 that combines the fast indexing of arrays with the easy extension of cons-based (or singly-linked) linked lists. Like arrays, VLists have constant-time lookup on average and are highly compact, requiring only O(log n) storage for pointers, allowing them to take advantage of locality of reference. Like singly-linked or cons-based lists, they are persistent, and elements can be added to or removed from the front in constant time. Length can also be found in O(log n) time. The primary operations of a VList are: Locate the kth element (O average, O worst-case) Add an element to the front of the VList (O average, with an occasional allocation) Obtain a new array beginning at the second element of an old array (O) Compute the length of the list (O) The primary advantages VLists have over arrays are that they are threadsafe (when locking is used; see the discussion page) and that different updated versions of the VList automatically share structure. Because VLists are immutable, they are most useful in functional programming languages, where their efficiency allows a purely functional implementation of data structures traditionally thought to require mutable arrays, such as hash tables. However, VLists also have a number of disadvantages over their competitors: While immutability is a benefit, it is also a drawback, making it inefficient to modify elements in the middle of the array. Access near the end of the list can be as expensive as O(log n); it is only constant on average over all elements. This is still, however, much better than performing the same operation on cons-based lists. Wasted space in the first block is proportional to n. This is similar to linked lists, but there are data structures with less overhead. When used as a fully persistent data structure, the overhead may be considerably higher and this data structure may not be appropriate.
- En algorithmique, une VList est une structure de données persistante (conçue par Phil Bagwell en 2002), qui combine l'accès rapide aux éléments (comme dans les tableaux) avec la souplesse d'extension des listes simplement chaînées.
- V-список — структура данных, разработанная Филом Багвеллом в 2002 году. V-список объединяет в себе быстрый доступ к случайным элементам и быстрое расширение списка. V-список требует только log n дополнительной памяти, где n — количество элементов в списке. V-список состоит из обычного списка массивов, размеры которых образуют геометрическую прогрессию. Для того, чтобы найти элемент в V-списке, надо знать всего лишь адрес массива, в котором находится искомый элемент и его индекс в этом массиве. В среднем поиск случайного элемента занимает O(1) операций и O(log n) — наихудший случай.
|
| dbpprop:forProperty
| |
| dbpprop:hasPhotoCollection
| |
| dbpprop:reference
| |
| dbpprop:wikiPageUsesTemplate
| |
| rdf:type
| |
| rdfs:comment
|
- In computer science, the VList is a persistent data structure designed by Phil Bagwell in 2002 that combines the fast indexing of arrays with the easy extension of cons-based (or singly-linked) linked lists. Like arrays, VLists have constant-time lookup on average and are highly compact, requiring only O(log n) storage for pointers, allowing them to take advantage of locality of reference.
- En algorithmique, une VList est une structure de données persistante (conçue par Phil Bagwell en 2002), qui combine l'accès rapide aux éléments (comme dans les tableaux) avec la souplesse d'extension des listes simplement chaînées.
- V-список — структура данных, разработанная Филом Багвеллом в 2002 году. V-список объединяет в себе быстрый доступ к случайным элементам и быстрое расширение списка. V-список требует только log n дополнительной памяти, где n — количество элементов в списке.
|
| rdfs:label
| |
| owl:sameAs
| |
| skos:subject
| |
| foaf:page
| |
| is owl:sameAs
of | |