DictionaryPropertyMap
public struct DictionaryPropertyMap<Graph: GraphProtocol, Key, Value>: ExternalPropertyMap
where Key: Hashable
extension DictionaryPropertyMap: ParallelCapablePropertyMap where Graph: ParallelGraph
An external property map backed by a dictionary.
-
Initialize
self
providingvalues
for each edge.Declaration
Swift
public init(_ values: [Key : Value], defaultValue: Value? = nil)
-
Declaration
Swift
public subscript(key: Key) -> Value { get set }
-
Initializes
self
usingvalues
;graph
is unused, but helps type inference along nicely.Declaration
Swift
public init(_ values: [Graph.EdgeId : Value], forEdgesIn graph: Graph)
-
Initializes
self
usingvalues
;graph
is unused, but helps type inference along.Declaration
Swift
public init(_ values: [Graph.VertexId : Value], forVerticesIn graph: Graph)
-
Initializes
self
where every vertex hasvalue
;graph
is used for type inference.Declaration
Swift
public init(repeating value: Value, forVerticesIn graph: Graph)