Function
enqueueBounded
(targets: Uint32Array, from: number, to: number, depth: number)
Source from the content-addressed store, hash-verified
| 8117 | |
| 8118 | const depths = new Uint32Array(cache.nodeIds.length) |
| 8119 | const enqueueBounded = (targets: Uint32Array, from: number, to: number, depth: number) => { |
| 8120 | for (let i = from; i < to; i++) { |
| 8121 | const neighbor = targets[i] |
| 8122 | if (discovered[neighbor] === 0) { |
| 8123 | discovered[neighbor] = 1 |
| 8124 | queue[tail] = neighbor |
| 8125 | depths[tail++] = depth + 1 |
| 8126 | } |
| 8127 | } |
| 8128 | } |
| 8129 | |
| 8130 | return { |
| 8131 | next() { |
Tested by
no test coverage detected