CollectionPriorityQueueIndexer

public struct CollectionPriorityQueueIndexer<
  Key: IdIndexable,
  Table: RandomAccessCollection & MutableCollection,
  Value
>: PriorityQueueIndexer, IndexProtocol
where Table.Index == Int, Table.Element == Value?
extension CollectionPriorityQueueIndexer: DefaultInitializable where Table: DefaultInitializable

Adapts a collection indexed by Ints into a PriorityQueueIndexer and IndexProtocol.

  • The collection that stores the mappings from Ints to Value?s.

    Declaration

    Swift

    public var table: Table
  • Constrcuts self by wrapping table.

    Declaration

    Swift

    public init(_ table: Table)
  • Accesses the value associated with key.

    Declaration

    Swift

    public subscript(key: Key) -> Value? { get set }

Available where Table: DefaultInitializable