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

Method all_perps

graph.py:2857–2866  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2855 yield a, b, c, d
2856
2857 def all_perps(self) -> Generator[tuple[Point, ...], None, None]:
2858 for ang in self.vhalfpi.neighbors(Angle):
2859 d1, d2 = ang.directions
2860 if d1 is None or d2 is None:
2861 continue
2862 if d1 == d2:
2863 continue
2864 for l1, l2 in utils.cross(d1.neighbors(Line), d2.neighbors(Line)):
2865 for a, b, c, d in utils.all_4points(l1, l2):
2866 yield a, b, c, d
2867
2868 def all_congs(self) -> Generator[tuple[Point, ...], None, None]:
2869 for l in self.type2nodes[Length]:

Callers 2

test_enumerate_perpsMethod · 0.80
match_allFunction · 0.80

Calls 2

neighborsMethod · 0.80
crossMethod · 0.80

Tested by 1

test_enumerate_perpsMethod · 0.64