Swiftpack.co - vale-cocoa/PriorityQueue as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by vale-cocoa.
vale-cocoa/PriorityQueue 2.1.0
A queue data structure (with value semantics) whose elements are dequeued by priority order.
⭐️ 0
🕓 3 weeks ago
.package(url: "https://github.com/vale-cocoa/PriorityQueue.git", from: "2.1.0")

PriorityQueue

A queue data structure — with value semantics— whose elements are dequeued by priority order.

Priority of one element over another is defined via a strict ordering function given at creation time and invariable during the life time of an instance. Such that given sort as the ordering function, then for any elements a, b, and c, the following conditions must hold:

  • sort(a, a) is always false. (Irreflexivity)
  • If sort(a, b) and sort(b, c) are both true, then sort(a, c) is also true. ( Transitive comparability)
  • Two elements are incomparable if neither is ordered before the other according to the sort function. If a and b are incomparable, and b and c are incomparable, then a and c are also incomparable. (Transitive incomparability)

GitHub

link
Stars: 0
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics