(adjacency: Map<NodeIndex, Array<EdgeIndex>>)
| 230 | |
| 231 | /** @internal */ |
| 232 | const cloneAdjacency = (adjacency: Map<NodeIndex, Array<EdgeIndex>>): Map<NodeIndex, Array<EdgeIndex>> => { |
| 233 | const cloned = new Map<NodeIndex, Array<EdgeIndex>>() |
| 234 | for (const [nodeIndex, edges] of adjacency) { |
| 235 | cloned.set(nodeIndex, [...edges]) |
| 236 | } |
| 237 | return cloned |
| 238 | } |
| 239 | |
| 240 | /** |
| 241 | * Immutable graph type for source-to-target relationships. |
no test coverage detected