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

Method range_fn

graph.py:2582–2594  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2580
2581 # Step 2: draw.
2582 def range_fn() -> (
2583 list[Union[nm.Point, nm.Line, nm.Circle, nm.HalfLine, nm.HoleCircle]]
2584 ):
2585 to_be_intersected = []
2586 for c in clause.constructions:
2587 cdef = definitions[c.name]
2588 mapping = dict(zip(cdef.construction.args, c.args))
2589 for n in cdef.numerics:
2590 args = [mapping[a] for a in n.args]
2591 args = list(map(lambda x: self.get(x, lambda: int(x)), args))
2592 to_be_intersected += nm.sketch(n.name, args)
2593
2594 return to_be_intersected
2595
2596 is_total_free = (
2597 len(clause.constructions) == 1 and clause.constructions[0].name in FREE

Callers

nothing calls this directly

Calls 1

getMethod · 0.95

Tested by

no test coverage detected