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

Function _merge

scripts/test-impact/profile_map_v2.py:329–341  ·  view source on GitHub ↗
(source, target, start, middle, end, compare, gate)

Source from the content-addressed store, hash-verified

327
328
329def _merge(source, target, start, middle, end, compare, gate):
330 left, right = start, middle
331 for destination in range(start, end):
332 gate.step()
333 take_left = right == end or (
334 left < middle and compare(source[left], source[right]) <= 0
335 )
336 if take_left:
337 target[destination] = source[left]
338 left += 1
339 else:
340 target[destination] = source[right]
341 right += 1
342
343
344def _sort(values, compare, gate):

Callers 1

_sortFunction · 0.70

Calls 3

rangeFunction · 0.85
compareFunction · 0.70
stepMethod · 0.45

Tested by

no test coverage detected