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

Method translate

problem.py:193–208  ·  view source on GitHub ↗

Translate point names into alphabetical.

(self)

Source from the content-addressed store, hash-verified

191 return Problem(self.url, list(self.clauses), self.goal)
192
193 def translate(self) -> Problem: # to single-char point names
194 """Translate point names into alphabetical."""
195 mapping = {}
196 clauses = []
197
198 for clause in self.clauses:
199 clauses.append(clause.translate(mapping))
200
201 if self.goal:
202 goal = self.goal.translate(mapping)
203 else:
204 goal = self.goal
205
206 p = Problem(self.url, clauses, goal)
207 p.mapping = mapping
208 return p
209
210 def txt(self) -> str:
211 return (

Callers 1

from_txtMethod · 0.95

Calls 2

ProblemClass · 0.85
translateMethod · 0.45

Tested by

no test coverage detected