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

Method __init__

ar.py:276–290  ·  view source on GitHub ↗
(self, const: str = '1')

Source from the content-addressed store, hash-verified

274 """The coefficient matrix."""
275
276 def __init__(self, const: str = '1'):
277 self.const = const
278 self.v2e = {}
279 self.add_free(const) # the table {var: expression}
280
281 # to cache what is already derived/inputted
282 self.eqs = set()
283 self.groups = [] # groups of equal pairs.
284
285 # for why (linprog)
286 self.c = []
287 self.v2i = {} # v -> index of row in A.
288 self.deps = [] # equal number of columns.
289 self.A = np.zeros([0, 0]) # pylint: disable=invalid-name
290 self.do_why = True
291
292 def add_free(self, v: str) -> None:
293 self.v2e[v] = {v: frac(1)}

Callers 4

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

add_freeMethod · 0.95

Tested by

no test coverage detected