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

Method _create_const_rat

graph.py:149–153  ·  view source on GitHub ↗
(self, n: int, d: int)

Source from the content-addressed store, hash-verified

147 self.connect_val(ang, deps=None)
148
149 def _create_const_rat(self, n: int, d: int) -> None:
150 n, d = ar.simplify(n, d)
151 rat = self.rconst[(n, d)] = self.new_node(Ratio, f'{n}/{d}')
152 rat.set_lengths(None, None)
153 self.connect_val(rat, deps=None)
154
155 def get_or_create_const_ang(self, n: int, d: int) -> None:
156 n, d = ar.simplify(n, d)

Callers 1

Calls 3

new_nodeMethod · 0.95
connect_valMethod · 0.95
set_lengthsMethod · 0.80

Tested by

no test coverage detected