MCPcopy Index your code
hub / github.com/google-deepmind/alphageometry / create_consts_str

Function create_consts_str

dd.py:1126–1135  ·  view source on GitHub ↗
(g: gh.Graph, s: str)

Source from the content-addressed store, hash-verified

1124
1125
1126def create_consts_str(g: gh.Graph, s: str) -> gm.Angle | gm.Ratio:
1127 if 'pi/' in s:
1128 n, d = s.split('pi/')
1129 n, d = int(n), int(d)
1130 p0, _ = g.get_or_create_const_ang(n, d)
1131 else:
1132 n, d = s.split('/')
1133 n, d = int(n), int(d)
1134 p0, _ = g.get_or_create_const_rat(n, d)
1135 return p0
1136
1137
1138def do_algebra(

Callers 1

bfs_one_levelFunction · 0.70

Calls 2

Tested by

no test coverage detected