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

Method copy

graph.py:128–141  ·  view source on GitHub ↗

Make a copy of self.

(self)

Source from the content-addressed store, hash-verified

126 self._triplet2circle = {}
127
128 def copy(self) -> Graph:
129 """Make a copy of self."""
130 p, definitions = self.build_def
131
132 p = p.copy()
133 for clause in p.clauses:
134 clause.nums = []
135 for pname in clause.points:
136 clause.nums.append(self._name2node[pname].num)
137
138 g, _ = Graph.build_problem(p, definitions, verbose=False, init_copy=False)
139
140 g.build_clauses = list(getattr(self, 'build_clauses', []))
141 return g
142
143 def _create_const_ang(self, n: int, d: int) -> None:
144 n, d = ar.simplify(n, d)

Callers 2

add_eqratioMethod · 0.45

Calls 1

build_problemMethod · 0.80

Tested by

no test coverage detected