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

Method add_simtri

graph.py:2372–2389  ·  view source on GitHub ↗

Add two similar triangles.

(
      self, points: list[Point], deps: EmptyDependency
  )

Source from the content-addressed store, hash-verified

2370 yield [c, a, c, b, z, y, z, x]
2371
2372 def add_simtri(
2373 self, points: list[Point], deps: EmptyDependency
2374 ) -> list[Dependency]:
2375 """Add two similar triangles."""
2376 add = []
2377 hashs = [d.hashed() for d in deps.why]
2378
2379 for args in self.enum_triangle(points):
2380 if problem.hashed('eqangle6', args) in hashs:
2381 continue
2382 add += self.add_eqangle(args, deps=deps)
2383
2384 for args in self.enum_triangle(points):
2385 if problem.hashed('eqratio6', args) in hashs:
2386 continue
2387 add += self.add_eqratio(args, deps=deps)
2388
2389 return add
2390
2391 def check_simtri(self, points: list[Point]) -> bool:
2392 a, b, c, x, y, z = points

Callers 2

add_pieceMethod · 0.95
add_simtri_checkMethod · 0.95

Calls 4

enum_triangleMethod · 0.95
add_eqangleMethod · 0.95
add_eqratioMethod · 0.95
hashedMethod · 0.80

Tested by

no test coverage detected