MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeSparseMutableGraph

Function makeSparseMutableGraph

packages/effect/test/Graph.test.ts:3817–3827  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 1

Graph.test.tsFile · 0.85

Calls 1

StringInterface · 0.50

Tested by

no test coverage detected