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

Method check_coll

graph.py:983–991  ·  view source on GitHub ↗
(self, points: list[Point])

Source from the content-addressed store, hash-verified

981 return add
982
983 def check_coll(self, points: list[Point]) -> bool:
984 points = list(set(points))
985 if len(points) < 3:
986 return True
987 line2count = defaultdict(lambda: 0)
988 for p in points:
989 for l in p.neighbors(Line):
990 line2count[l] += 1
991 return any([count == len(points) for _, count in line2count.items()])
992
993 def why_coll(self, args: tuple[Line, list[Point]]) -> list[Dependency]:
994 line, points = args

Callers 12

checkMethod · 0.95
coll_depMethod · 0.95
add_collMethod · 0.95
check_ncollMethod · 0.95
check_para_or_collMethod · 0.95
_add_para_or_collMethod · 0.95
check_midpMethod · 0.95
why_meMethod · 0.80
test_enumerate_collsMethod · 0.80

Calls 1

neighborsMethod · 0.80

Tested by 2

test_enumerate_collsMethod · 0.64