MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / at

Function at

graph-ui/src/galaxy/graph-scope.ts:288–288  ·  view source on GitHub ↗
(level: number)

Source from the content-addressed store, hash-verified

286export function nextLayerEstimate(scope: ScopedGraph | undefined): { layer: number; frontier: number; perNode: number; estimate: number } | undefined {
287 if (!scope?.levels || scope.exhausted || scope.partial) return undefined;
288 const at = (level: number) => scope.data.nodes.filter(node => (scope.roots.has(node.id) ? 0 : scope.levels!.get(node.id)) === level).length;
289 const frontier = at(scope.depth);
290 if (frontier === 0) return undefined;
291 const perNode = scope.depth > 0 ? frontier / Math.max(1, at(scope.depth - 1)) : 1;

Callers 1

nextLayerEstimateFunction · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected