All Projects → lukaskubanek → Ordereddictionary

lukaskubanek / Ordereddictionary

Licence: mit
Ordered dictionary data structure implementation in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Ordereddictionary

Algorithm
Algorithm is a library of tools that is used to create intelligent applications.
Stars: ✭ 787 (+347.16%)
Mutual labels:  dictionary, data-structure
Russian Words
List of Russian words
Stars: ✭ 168 (-4.55%)
Mutual labels:  dictionary
Cs61a
Structure and Interpretation of Computer Programs
Stars: ✭ 123 (-30.11%)
Mutual labels:  data-structure
Skiplist
skip list with rank, code less than z_set in redis
Stars: ✭ 136 (-22.73%)
Mutual labels:  data-structure
Mnemonist
Curated collection of data structures for the JavaScript/TypeScript language.
Stars: ✭ 1,752 (+895.45%)
Mutual labels:  data-structure
Awesome
🚠Algorithm And Data Structure
Stars: ✭ 152 (-13.64%)
Mutual labels:  data-structure
Data Structures
Data-Structures using C++.
Stars: ✭ 121 (-31.25%)
Mutual labels:  data-structure
Leetcode Solutions
🏋️ Python / Modern C++ Solutions of All 2111 LeetCode Problems (Weekly Update)
Stars: ✭ 2,787 (+1483.52%)
Mutual labels:  data-structure
Aboutsecurity
A list of payload and bypass lists for penetration testing and red team infrastructure build.
Stars: ✭ 166 (-5.68%)
Mutual labels:  dictionary
Dictionary
A list of the most popular English words.
Stars: ✭ 135 (-23.3%)
Mutual labels:  dictionary
Copytranslator
Foreign language reading and translation assistant based on copy and translate.
Stars: ✭ 12,787 (+7165.34%)
Mutual labels:  dictionary
Apachecn Algo Zh
ApacheCN 数据结构与算法译文集
Stars: ✭ 10,498 (+5864.77%)
Mutual labels:  data-structure
Scalpl
A lightweight wrapper to operate on nested dictionaries seamlessly. 👌
Stars: ✭ 153 (-13.07%)
Mutual labels:  dictionary
Dictomaton
Finite state dictionaries in Java
Stars: ✭ 124 (-29.55%)
Mutual labels:  dictionary
Wiktextract
Wiktionary dump file parser and multilingual data extractor
Stars: ✭ 170 (-3.41%)
Mutual labels:  dictionary
Data Structures With Go
Data Structures with Go Language
Stars: ✭ 121 (-31.25%)
Mutual labels:  dictionary
Dynamictranslator
Instant translation application for windows in .NET 🎪
Stars: ✭ 131 (-25.57%)
Mutual labels:  dictionary
Data structures and algorithms in python
📖 Worked Solutions of "Data Structures & Algorithms in Python", written by Michael T. Goodrich, Roberto Tamassia and Michael H. Goldwasser. ✏️
Stars: ✭ 147 (-16.48%)
Mutual labels:  data-structure
Emoji Ime Dictionary
日本語で絵文字入力をするための IME 追加辞書 📙 Google 日本語入力などで日本語から絵文字への変換を可能にする IME 拡張辞書です
Stars: ✭ 172 (-2.27%)
Mutual labels:  dictionary
Sdcv
Stars: ✭ 171 (-2.84%)
Mutual labels:  dictionary

OrderedDictionary

Swift 4.2+ Swift Package Manager Carthage License: MIT Twitter: @lukaskubanek

OrderedDictionary is a lightweight implementation of an ordered dictionary data structure in Swift.

The OrderedDictionary struct is a generic collection that combines the features of Dictionary and Array data structures from the Swift standard library. Like Dictionary, it stores key-value pairs with each key being unique and maps each key to an associated value. Like Array, it stores those pairs sorted and accessible by a zero-based integer index.

OrderedDictionary provides similar APIs to collections in the Swift standard library like accessing contents by keys or indices, inserting and removing elements, iterating, sorting, filtering, etc.

Internally, OrderedDictionary uses a backing storage composed of a Dictionary for storing the key-value pairs and an Array for managing the ordered keys. This architecture makes it not the most pefromant implementation possible, but it gets its job done while reusing most functionality from the Swift standard library.

Requirements

  • Swift 4.2+
  • Xcode 10.0+
  • iOS 8.0+ / macOS 10.10+

For support of Swift 4.0 and 4.1 please refer to version 2.x of this library. The Xcode and OS requirements apply only when the library is integrated as a framework or via the Xcode project.

Installation

Swift Package Manager

To install OrderedDictionary using the Swift Package Manager, add it as a dependency into your Package.swift file:

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/lukaskubanek/OrderedDictionary.git", from: "3.0.1")
    ],
    ...
)

Carthage

To install OrderedDictionary using Carthage, add it as a dependency into your Cartfile:

github "lukaskubanek/LoremSwiftum"

Then drag either the OrderedDictionary.xcodeproj or the OrderedDictionary.framework into your Xcode project/workspace and link your target against the OrderedDictionary.framework. Make sure that the framework gets copied to your application bundle.

Git Submodules

You can also install OrderedDictionary via Git submodules and integrate the project OrderedDictionary.xcodeproj from the submodule directly into your Xcode workspace.

⚠️ Note About CocoaPods

Although there has been a high demand for CocoaPods support, this distribution method won't be officially supported by this library. If you really want to integrate this library via CocoaPods, you can create and maintain a custom podspec (see the last section of this post).

Usage & Docs

For the usage of this library please refer to the example playground. For documentation please refer to the documentation comments.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].