Commonly used data structures for Swift
翻译准备中
开发工具Swift · PythonGitHub @apple自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Swift Collections is an open-source package of data structure implementations for the Swift programming language.
The package currently provides the following types, organized into thematic modules:
BasicContainers moduleOwnership-aware reimplementations of the standard generic collection types Array, Set, and Dictionary.
struct UniqueArray<Element> is a uniquely held, dynamically resizing array.struct RigidArray<Element> is a fixed-capacity array.DequeModule moduleImplementations of double-ended queue types, implemented by a ring buffer.
struct Deque<Element> is a classic collection, implementing value semantics with the copy-on-write optimization.struct UniqueDeque<Element> is a uniquely held, dynamically resizing, noncopyable deque.struct RigidDeque<Element> is a fixed-capacity deque implementation.OrderedCollections moduleProvides variants of the standard Set and Dictionary types with user-defined ordering.
struct OrderedSet<Element> is a Set that preserves insertion order.struct OrderedDictionary<Key, Value> is a Dictionary that preserves insertion order.BitCollections moduleProvides efficient implementations of bit maps.
struct BitSet is a more efficient implementation of Set<Int>.struct BitArray is a more efficient implementation of Array<Bool>.HeapModule modulestruct Heap<Element>, a min-max heap backed by an array, suitable for use as a priority queue.HashTreeCollections modulePersistent hashed collections implementing Compressed Hash-Array Mapped Prefix Trees (CHAMP). These are like Set and Dictionary, but they support efficient mutations of shared copies of values, without duplicating the unchanged parts.
struct TreeSet<Element> is a persistent hashed set.struct TreeDictionary<Key, Value> is a persistent hashed dictionary.以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗