MCPcopy
hub / github.com/keon/algorithms / clone

Method clone

algorithms/math/polynomial.py:560–566  ·  view source on GitHub ↗

Create a deep copy of this polynomial. Returns: A new Polynomial with cloned monomials.

(self)

Source from the content-addressed store, hash-verified

558 )
559
560 def clone(self) -> Polynomial:
561 """Create a deep copy of this polynomial.
562
563 Returns:
564 A new Polynomial with cloned monomials.
565 """
566 return Polynomial(list({m.clone() for m in self.all_monomials()}))
567
568 def variables(self) -> set:
569 """Get all variable indices present in this polynomial.

Callers 1

poly_long_divisionMethod · 0.95

Calls 3

all_monomialsMethod · 0.95
PolynomialClass · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected