MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / get_lines_thru_all

Function get_lines_thru_all

geometry.py:420–426  ·  view source on GitHub ↗
(*points: list[Point])

Source from the content-addressed store, hash-verified

418
419
420def get_lines_thru_all(*points: list[Point]) -> list[Line]:
421 line2count = defaultdict(lambda: 0)
422 points = set(points)
423 for p in points:
424 for l in p.neighbors(Line):
425 line2count[l] += 1
426 return [l for l, count in line2count.items() if count == len(points)]
427
428
429def line_of_and_why(

Callers 1

line_of_and_whyFunction · 0.85

Calls 1

neighborsMethod · 0.80

Tested by

no test coverage detected