| 3815 | const staleTraversalNodeCount = 20000 |
| 3816 | |
| 3817 | const makeSparseMutableGraph = () => { |
| 3818 | const graph = Graph.directed<string, number>((mutable) => { |
| 3819 | for (let i = 0; i < staleTraversalNodeCount; i++) { |
| 3820 | Graph.addNode(mutable, String(i)) |
| 3821 | } |
| 3822 | }) |
| 3823 | return { |
| 3824 | mutable: Graph.beginMutation(graph), |
| 3825 | start: Array.from({ length: staleTraversalNodeCount }, (_, index) => index) |
| 3826 | } |
| 3827 | } |
| 3828 | |
| 3829 | const removeNodes = (mutable: Graph.MutableDirectedGraph<string, number>, nodes: Array<Graph.NodeIndex>) => { |
| 3830 | for (const node of nodes) { |