NZMATH  1.2.0 About: NZMATH is a Python based number theory oriented calculation system.   Fossies Dox: NZMATH-1.2.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)
nzmath.poly.uniutil.DivisionProvider Class Reference
Inheritance diagram for nzmath.poly.uniutil.DivisionProvider:
[legend]
Collaboration diagram for nzmath.poly.uniutil.DivisionProvider:
[legend]

Public Member Functions

def __init__ (self)

def __divmod__ (self, other)

def __floordiv__ (self, other)

def __mod__ (self, other)

def mod (self, dividend)

def mod_pow (self, polynom, index)

def __truediv__ (self, other)

def scalar_exact_division (self, scale)

def gcd (self, other)

def extgcd (self, other)

Private Member Functions

def _populate_reduced (self, degree, lc, upperbound)

def _populate_reduced_more (self, degrees)

_reduced

Detailed Description

```DivisionProvider provides all kind of divisions for univariate
polynomials.  It is assumed that the coefficient ring of the
polynomials is a field.

The class should be used as a mix-in.

REQUIRE: OrderProvider
```

Definition at line 78 of file uniutil.py.

◆ __init__()

 def nzmath.poly.uniutil.DivisionProvider.__init__ ( self )
```Do not instantiate DivisionProvider.
This initializer should be called from descendant.
```

Definition at line 88 of file uniutil.py.

◆ __divmod__()

 def nzmath.poly.uniutil.DivisionProvider.__divmod__ ( self, other )
```divmod(self, other)

The method does, as the built-in divmod, return a tuple of
(self // other, self % other).
```

Definition at line 97 of file uniutil.py.

◆ __floordiv__()

 def nzmath.poly.uniutil.DivisionProvider.__floordiv__ ( self, other )

◆ __mod__()

 def nzmath.poly.uniutil.DivisionProvider.__mod__ ( self, other )
```self % other
```

Definition at line 127 of file uniutil.py.

◆ __truediv__()

 def nzmath.poly.uniutil.DivisionProvider.__truediv__ ( self, other )
```self / other

The result is a rational function.
```

Definition at line 285 of file uniutil.py.

◆ _populate_reduced()

 def nzmath.poly.uniutil.DivisionProvider._populate_reduced ( self, degree, lc, upperbound )
private

◆ _populate_reduced_more()

 def nzmath.poly.uniutil.DivisionProvider._populate_reduced_more ( self, degrees )
private
```Populate self._reduced more for much higher degree dividend.
This method has to be called after _populate_reduced.

self._reduced is populated so that it will include all of
degrees > degree * 2.  The degrees are recommended to be
sorted in descending order.
```

Definition at line 223 of file uniutil.py.

◆ extgcd()

 def nzmath.poly.uniutil.DivisionProvider.extgcd ( self, other )
```Return a tuple (u, v, d); they are the greatest common divisor
d of two polynomials self and other and u, v such that
d = self * u + other * v.

see nzmath.gcd.extgcd
```

Definition at line 316 of file uniutil.py.

◆ gcd()

 def nzmath.poly.uniutil.DivisionProvider.gcd ( self, other )
```Return a greatest common divisor of self and other.
Returned polynomial is always monic.
```

Definition at line 300 of file uniutil.py.

Referenced by nzmath.rational.IntegerRing.lcm().

◆ mod()

 def nzmath.poly.uniutil.DivisionProvider.mod ( self, dividend )

◆ mod_pow()

 def nzmath.poly.uniutil.DivisionProvider.mod_pow ( self, polynom, index )

◆ scalar_exact_division()

 def nzmath.poly.uniutil.DivisionProvider.scalar_exact_division ( self, scale )
```Return quotient by a scalar which can divide each coefficient
exactly.
```

Definition at line 293 of file uniutil.py.

◆ _reduced

 nzmath.poly.uniutil.DivisionProvider._reduced
private

Definition at line 95 of file uniutil.py.

The documentation for this class was generated from the following file: