Structures
The following structures are available globally.
-
A PriorityQueue takes objects to be pushed of any type that implements Comparable. It will pop the objects in the order that they would be sorted. A pop() or a push() can be accomplished in O(lg n) time. It can be specified whether the objects should be popped in ascending or descending order (Max Priority Queue or Min Priority Queue) at the time of initialization.
See moreDeclaration
Swift
public struct PriorityQueue<T> where T : Comparableextension PriorityQueue: IteratorProtocolextension PriorityQueue: Sequenceextension PriorityQueue: Collectionextension PriorityQueue: CustomStringConvertible, CustomDebugStringConvertible -
A weighted edge, who’s weight subscribes to Comparable.
See moreDeclaration
Swift
public struct WeightedEdge<W> : Edge, CustomStringConvertible, Equatable where W : Decodable, W : Encodable, W : Equatableextension WeightedEdge: WeightedEdgeProtocolextension WeightedEdge: Comparable where W: Comparable
View on GitHub
Structures Reference