NZMATH
1.2.0
About: NZMATH is a Python based number theory oriented calculation system.
![]() ![]() |
Public Member Functions | |
def | pseudo_divmod (self, other) |
def | pseudo_floordiv (self, other) |
def | pseudo_mod (self, other) |
def | __truediv__ (self, other) |
def | exact_division (self, other) |
def | scalar_exact_division (self, scale) |
def | monic_divmod (self, other) |
def | monic_floordiv (self, other) |
def | monic_mod (self, other) |
def | monic_pow (self, index, mod) |
PseudoDivisionProvider provides pseudo divisions for univariate polynomials. It is assumed that the coefficient ring of the polynomials is a domain. The class should be used as a mix-in.
Definition at line 338 of file uniutil.py.
def nzmath.poly.uniutil.PseudoDivisionProvider.__truediv__ | ( | self, | |
other | |||
) |
self / other Return the result as a rational function.
Definition at line 434 of file uniutil.py.
def nzmath.poly.uniutil.PseudoDivisionProvider.exact_division | ( | self, | |
other | |||
) |
Return quotient of exact division.
Definition at line 443 of file uniutil.py.
References nzmath.poly.multiutil.OrderProvider.order, nzmath.poly.uniutil.OrderProvider.order, nzmath.finitefield.FiniteField.order(), nzmath.finitefield.FinitePrimeFieldElement.order(), nzmath.permute.Permute.order(), nzmath.group.GroupElement.order(), nzmath.permute.ExPermute.order(), nzmath.elliptic.ECoverGF.order(), nzmath.poly.multiutil.PseudoDivisionProvider.pseudo_divmod(), and nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_divmod().
def nzmath.poly.uniutil.PseudoDivisionProvider.monic_divmod | ( | self, | |
other | |||
) |
self.monic_divmod(other) -> (Q, R) Q, R are polynomials such that self == other * Q + R. The leading coefficient of other MUST be one.
Definition at line 465 of file uniutil.py.
References nzmath.poly.univar.PolynomialInterface.construct_with_default(), nzmath.poly.formalsum.FormalSumContainerInterface.construct_with_default(), nzmath.poly.formalsum.DictFormalSum.construct_with_default(), nzmath.poly.multivar.BasicPolynomial.construct_with_default(), nzmath.poly.formalsum.ListFormalSum.construct_with_default(), nzmath.poly.multiutil.OrderProvider.order, nzmath.poly.uniutil.OrderProvider.order, nzmath.finitefield.FiniteField.order(), nzmath.finitefield.FinitePrimeFieldElement.order(), nzmath.permute.Permute.order(), nzmath.group.GroupElement.order(), nzmath.permute.ExPermute.order(), and nzmath.elliptic.ECoverGF.order().
def nzmath.poly.uniutil.PseudoDivisionProvider.monic_floordiv | ( | self, | |
other | |||
) |
self.monic_floordiv(other) -> Q Q is a polynomial such that self == other * Q + R, where R is a polynomial whose degree is smaller than other's. The leading coefficient of other MUST be one.
Definition at line 492 of file uniutil.py.
References nzmath.poly.univar.PolynomialInterface.construct_with_default(), nzmath.poly.formalsum.FormalSumContainerInterface.construct_with_default(), nzmath.poly.formalsum.DictFormalSum.construct_with_default(), nzmath.poly.multivar.BasicPolynomial.construct_with_default(), nzmath.poly.formalsum.ListFormalSum.construct_with_default(), nzmath.poly.multiutil.OrderProvider.order, nzmath.poly.uniutil.OrderProvider.order, nzmath.finitefield.FiniteField.order(), nzmath.finitefield.FinitePrimeFieldElement.order(), nzmath.permute.Permute.order(), nzmath.group.GroupElement.order(), nzmath.permute.ExPermute.order(), and nzmath.elliptic.ECoverGF.order().
def nzmath.poly.uniutil.PseudoDivisionProvider.monic_mod | ( | self, | |
other | |||
) |
self.monic_mod(other) -> R R is a polynomial such that self == other * Q + R, where Q is another polynomial. The leading coefficient of other MUST be one.
Definition at line 520 of file uniutil.py.
References nzmath.poly.univar.PolynomialInterface.construct_with_default(), nzmath.poly.formalsum.FormalSumContainerInterface.construct_with_default(), nzmath.poly.formalsum.DictFormalSum.construct_with_default(), nzmath.poly.multivar.BasicPolynomial.construct_with_default(), nzmath.poly.formalsum.ListFormalSum.construct_with_default(), nzmath.poly.multiutil.OrderProvider.order, nzmath.poly.uniutil.OrderProvider.order, nzmath.finitefield.FiniteField.order(), nzmath.finitefield.FinitePrimeFieldElement.order(), nzmath.permute.Permute.order(), nzmath.group.GroupElement.order(), nzmath.permute.ExPermute.order(), and nzmath.elliptic.ECoverGF.order().
Referenced by nzmath.poly.uniutil.PseudoDivisionProvider.monic_pow().
def nzmath.poly.uniutil.PseudoDivisionProvider.monic_pow | ( | self, | |
index, | |||
mod | |||
) |
Return self**index % mod. The leading coefficient of mod MUST be one.
Definition at line 545 of file uniutil.py.
References nzmath.poly.ratfunc.RationalFunction.getRing(), nzmath.poly.multiutil.RingElementProvider.getRing(), nzmath.real.Real.getRing(), nzmath.finitefield.FinitePrimeFieldElement.getRing(), nzmath.imaginary.Complex.getRing(), nzmath.intresidue.IntegerResidueClass.getRing(), nzmath.ring.RingElement.getRing(), nzmath.poly.multiutil.RingPolynomial.getRing(), nzmath.finitefield.ExtendedFieldElement.getRing(), nzmath.rational.Rational.getRing(), nzmath.algfield.BasicAlgNumber.getRing(), nzmath.ring.ResidueClass.getRing(), nzmath.algfield.MatAlgNumber.getRing(), nzmath.rational.Integer.getRing(), nzmath.matrix.RingSquareMatrix.getRing(), nzmath.poly.uniutil.RingElementProvider.getRing(), nzmath.poly.uniutil.RingPolynomial.getRing(), nzmath.poly.uniutil.PseudoDivisionProvider.monic_mod(), nzmath.poly.univar.PolynomialInterface.square(), nzmath.poly.univar.BasicPolynomial.square(), nzmath.poly.multivar.BasicPolynomial.square(), nzmath.poly.univar.SortedPolynomial.square(), and nzmath.poly.uniutil.FinitePrimeFieldPolynomial.square().
Referenced by nzmath.poly.uniutil.DomainPolynomial.__pow__().
def nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_divmod | ( | self, | |
other | |||
) |
self.pseudo_divmod(other) -> (Q, R) Q, R are polynomials such that d**(deg(self) - deg(other) + 1) * self == other * Q + R, where d is the leading coefficient of other.
Definition at line 346 of file uniutil.py.
References nzmath.poly.univar.PolynomialInterface.construct_with_default(), nzmath.poly.formalsum.FormalSumContainerInterface.construct_with_default(), nzmath.poly.formalsum.DictFormalSum.construct_with_default(), nzmath.poly.multivar.BasicPolynomial.construct_with_default(), nzmath.poly.formalsum.ListFormalSum.construct_with_default(), nzmath.poly.multiutil.OrderProvider.order, nzmath.poly.uniutil.OrderProvider.order, nzmath.finitefield.FiniteField.order(), nzmath.finitefield.FinitePrimeFieldElement.order(), nzmath.permute.Permute.order(), nzmath.group.GroupElement.order(), nzmath.permute.ExPermute.order(), and nzmath.elliptic.ECoverGF.order().
Referenced by nzmath.poly.uniutil.PseudoDivisionProvider.exact_division().
def nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_floordiv | ( | self, | |
other | |||
) |
self.pseudo_floordiv(other) -> Q Q is a polynomial such that d**(deg(self) - deg(other) + 1) * self == other * Q + R, where d is the leading coefficient of other and R is a polynomial.
Definition at line 377 of file uniutil.py.
References nzmath.poly.univar.PolynomialInterface.construct_with_default(), nzmath.poly.formalsum.FormalSumContainerInterface.construct_with_default(), nzmath.poly.formalsum.DictFormalSum.construct_with_default(), nzmath.poly.multivar.BasicPolynomial.construct_with_default(), nzmath.poly.formalsum.ListFormalSum.construct_with_default(), nzmath.poly.multiutil.OrderProvider.order, nzmath.poly.uniutil.OrderProvider.order, nzmath.finitefield.FiniteField.order(), nzmath.finitefield.FinitePrimeFieldElement.order(), nzmath.permute.Permute.order(), nzmath.group.GroupElement.order(), nzmath.permute.ExPermute.order(), and nzmath.elliptic.ECoverGF.order().
def nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_mod | ( | self, | |
other | |||
) |
self.pseudo_mod(other) -> R R is a polynomial such that d**(deg(self) - deg(other) + 1) * self == other * Q + R, where d is the leading coefficient of other and Q a polynomial.
Definition at line 406 of file uniutil.py.
References nzmath.poly.univar.PolynomialInterface.construct_with_default(), nzmath.poly.formalsum.FormalSumContainerInterface.construct_with_default(), nzmath.poly.formalsum.DictFormalSum.construct_with_default(), nzmath.poly.multivar.BasicPolynomial.construct_with_default(), nzmath.poly.formalsum.ListFormalSum.construct_with_default(), nzmath.poly.multiutil.OrderProvider.order, nzmath.poly.uniutil.OrderProvider.order, nzmath.finitefield.FiniteField.order(), nzmath.finitefield.FinitePrimeFieldElement.order(), nzmath.permute.Permute.order(), nzmath.group.GroupElement.order(), nzmath.permute.ExPermute.order(), and nzmath.elliptic.ECoverGF.order().
def nzmath.poly.uniutil.PseudoDivisionProvider.scalar_exact_division | ( | self, | |
scale | |||
) |
Return quotient by a scalar which can divide each coefficient exactly.
Definition at line 458 of file uniutil.py.
References nzmath.poly.formalsum.FormalSumContainerInterface.coefficients_map().
Referenced by nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.factor(), and nzmath.poly.uniutil.ContentProvider.primitive_part().