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

Function check

numericals.py:624–649  ·  view source on GitHub ↗

Numerical check.

(name: str, args: list[Union[gm.Point, Point]])

Source from the content-addressed store, hash-verified

622
623
624def check(name: str, args: list[Union[gm.Point, Point]]) -> bool:
625 """Numerical check."""
626 if name == 'eqangle6':
627 name = 'eqangle'
628 elif name == 'eqratio6':
629 name = 'eqratio'
630 elif name in ['simtri2', 'simtri*']:
631 name = 'simtri'
632 elif name in ['contri2', 'contri*']:
633 name = 'contri'
634 elif name == 'para':
635 name = 'para_or_coll'
636 elif name == 'on_line':
637 name = 'coll'
638 elif name in ['rcompute', 'acompute']:
639 return True
640 elif name in ['fixl', 'fixc', 'fixb', 'fixt', 'fixp']:
641 return True
642
643 fn_name = 'check_' + name
644 if fn_name not in globals():
645 return None
646
647 fun = globals()['check_' + name]
648 args = [p.num if isinstance(p, gm.Point) else p for p in args]
649 return fun(args)
650
651
652def check_circle(points: list[Point]) -> bool:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected