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

Class Construction

problem.py:49–66  ·  view source on GitHub ↗

One predicate.

Source from the content-addressed store, hash-verified

47
48
49class Construction:
50 """One predicate."""
51
52 @classmethod
53 def from_txt(cls, data: str) -> Construction:
54 data = data.split(' ')
55 return Construction(data[0], data[1:])
56
57 def __init__(self, name: str, args: list[str]):
58 self.name = name
59 self.args = args
60
61 def translate(self, mapping: dict[str, str]) -> Construction:
62 args = [a if isint(a) else mapping[a] for a in self.args]
63 return Construction(self.name, args)
64
65 def txt(self) -> str:
66 return ' '.join([self.name] + list(self.args))
67
68
69class Clause:

Callers 3

from_txtMethod · 0.85
translateMethod · 0.85
addMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected