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 more

    Declaration

    Swift

    public struct PriorityQueue<T> where T : Comparable
    extension PriorityQueue: IteratorProtocol
    extension PriorityQueue: Sequence
    extension PriorityQueue: Collection
    extension PriorityQueue: CustomStringConvertible, CustomDebugStringConvertible
  • A basic unweighted edge.

    See more

    Declaration

    Swift

    public struct UnweightedEdge : Edge, CustomStringConvertible, Equatable
  • A weighted edge, who’s weight subscribes to Comparable.

    See more

    Declaration

    Swift

    public struct WeightedEdge<W> : Edge, CustomStringConvertible, Equatable where W : Decodable, W : Encodable, W : Equatable
    extension WeightedEdge: WeightedEdgeProtocol
    extension WeightedEdge: Comparable where W: Comparable