replaceAll(nodes:edges:)
Replaces all nodes and edges in the graph with the provided collections.
Declaration
mutating func replaceAll(nodes: [ComputeNodeGraph.NodeID : ComputeNodeGraph.Node], edges: [ComputeNodeGraph.Edge]) throwsParameters
- nodes:
A sequence of nodes and their keys to add to the graph.
- edges:
A sequence of edges to add to the graph.
Discussion
This bulk operation allows for efficient wholesale replacement of the graph’s structure.