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

Function visit

packages/effect/src/Graph.ts:4789–4797  ·  view source on GitHub ↗
(adjacency: csr.Adjacency, current: number)

Source from the content-addressed store, hash-verified

4787 queue[tail++] = sourceNode
4788
4789 const visit = (adjacency: csr.Adjacency, current: number) => {
4790 for (let i = adjacency.rowOffsets[current]; i < adjacency.rowOffsets[current + 1]; i++) {
4791 const neighbor = adjacency.columnIndices[i]
4792 if (compactDistances[neighbor] === -1) {
4793 compactDistances[neighbor] = compactDistances[current] + 1
4794 queue[tail++] = neighbor
4795 }
4796 }
4797 }
4798 while (head < tail) {
4799 const current = queue[head++]
4800 visit(adjacencies.primary, current)

Callers 4

getUnweightedDistancesFunction · 0.70
constructorMethod · 0.70
visitMethod · 0.70
finalizeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected