(source: GraphImpl<N, E, T>)
| 188 | |
| 189 | /** @internal */ |
| 190 | export const finalize = <N, E, T extends Graph.Kind>(source: GraphImpl<N, E, T>): GraphImpl<N, E, T> => { |
| 191 | const graph: GraphImpl<N, E, T> = Object.create(ProtoGraph) |
| 192 | graph.type = source.type |
| 193 | graph.mutable = false |
| 194 | graph.transforming = false |
| 195 | graph.nodes = source.nodes |
| 196 | graph.edges = source.edges |
| 197 | graph.adjacency = source.adjacency |
| 198 | graph.reverseAdjacency = source.reverseAdjacency |
| 199 | graph.nextNodeIndex = source.nextNodeIndex |
| 200 | graph.nextEdgeIndex = source.nextEdgeIndex |
| 201 | graph.acyclic = source.acyclic |
| 202 | return graph |
| 203 | } |
| 204 | |
| 205 | /** @internal */ |
| 206 | export const snapshot = <N, E, T extends Graph.Kind>(graph: Graph.Graph<N, E, T>): Graph.Snapshot<N, E, T> => { |
no outgoing calls
no test coverage detected