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.ring.PolynomialRing Class Reference
Inheritance diagram for nzmath.poly.ring.PolynomialRing:
[legend]
Collaboration diagram for nzmath.poly.ring.PolynomialRing:
[legend]

## Public Member Functions

def __init__ (self, coeffring, number_of_variables=1)

def getCoefficientRing (self)

def getQuotientField (self)

def __eq__ (self, other)

def __ne__ (self, other)

def __hash__ (self)

def __repr__ (self)

def __str__ (self)

def __contains__ (self, element)

def issubring (self, other)

def issuperring (self, other)

def getCommonSuperring (self, other)

def getCharacteristic (self)

def createElement (self, seed)

def gcd (self, a, b)

def extgcd (self, a, b)

def getInstance (cls, coeffring, number_of_variables=1)

Public Member Functions inherited from nzmath.ring.CommutativeRing
def __init__ (self)

def isdomain (self)

def isnoetherian (self)

def isufd (self)

def ispid (self)

def iseuclidean (self)

def isfield (self)

def registerModuleAction (self, action_ring, action)

def hasaction (self, action_ring)

def getaction (self, action_ring)

## Public Attributes

number_of_variables

Public Attributes inherited from nzmath.ring.CommutativeRing
properties

## Properties

one = property(_get_one, None, None, "multiplicative unit")

zero = property(_get_zero, None, None, "additive unit")

## Private Member Functions

def _zero_polynomial (self)

def _constant_polynomial (self, seed)

def _prepared_polynomial (self, preparation)

def _get_one (self)

def _get_zero (self)

## Private Attributes

_coefficient_ring

_one

_zero

## Static Private Attributes

dictionary _instances = {}

## Detailed Description

```The class of uni-/multivariate polynomial ring.
There's no need to specify the variable names.
```

Definition at line 12 of file ring.py.

## ◆ __init__()

 def nzmath.poly.ring.PolynomialRing.__init__ ( self, coeffring, number_of_variables = `1` )
```PolynomialRing(coeffring)
creates a polynomial ring for univariate polynomials, while
PolynomialRing(coeffring, n)
creates a polynomial ring for multivariate polynomials.
```

Definition at line 20 of file ring.py.

## ◆ __contains__()

 def nzmath.poly.ring.PolynomialRing.__contains__ ( self, element )
````in' operator is provided for checking the element be in the
ring.
```

Definition at line 93 of file ring.py.

## ◆ __eq__()

 def nzmath.poly.ring.PolynomialRing.__eq__ ( self, other )

## ◆ __hash__()

 def nzmath.poly.ring.PolynomialRing.__hash__ ( self )

## ◆ __ne__()

 def nzmath.poly.ring.PolynomialRing.__ne__ ( self, other )

## ◆ __repr__()

 def nzmath.poly.ring.PolynomialRing.__repr__ ( self )

## ◆ __str__()

 def nzmath.poly.ring.PolynomialRing.__str__ ( self )

## ◆ _constant_polynomial()

 def nzmath.poly.ring.PolynomialRing._constant_polynomial ( self, seed )
private
```Return a constant polynomial made from a constant seed.
seed should not be zero.
```

Definition at line 190 of file ring.py.

Referenced by nzmath.poly.ring.PolynomialRing.createElement().

## ◆ _get_one()

 def nzmath.poly.ring.PolynomialRing._get_one ( self )
private

## ◆ _get_zero()

 def nzmath.poly.ring.PolynomialRing._get_zero ( self )
private

## ◆ _prepared_polynomial()

 def nzmath.poly.ring.PolynomialRing._prepared_polynomial ( self, preparation )
private
```Return a polynomial from given preparation, which is suited
for the first argument of uni-/multi-variable polynomials.
```

Definition at line 203 of file ring.py.

Referenced by nzmath.poly.ring.PolynomialRing.createElement().

## ◆ _zero_polynomial()

 def nzmath.poly.ring.PolynomialRing._zero_polynomial ( self )
private
```Return the zero polynomial in the polynomial ring.
```

Definition at line 179 of file ring.py.

Referenced by nzmath.poly.ring.PolynomialRing.createElement().

## ◆ createElement()

 def nzmath.poly.ring.PolynomialRing.createElement ( self, seed )
```Return an element in the ring made from seed.
```

Reimplemented from nzmath.ring.Ring.

Definition at line 166 of file ring.py.

## ◆ extgcd()

 def nzmath.poly.ring.PolynomialRing.extgcd ( self, a, b )
```Return the tuple (u, v, d): d is the greatest common divisor
of given polynomials, and they satisfy d = u*a + v*b. The
polynomials must be in the polynomial ring.  If the
coefficient ring is a field, the result is monic.
```

Definition at line 243 of file ring.py.

## ◆ gcd()

 def nzmath.poly.ring.PolynomialRing.gcd ( self, a, b )
```Return the greatest common divisor of given polynomials.
The polynomials must be in the polynomial ring.
If the coefficient ring is a field, the result is monic.
```

Definition at line 231 of file ring.py.

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

## ◆ getCharacteristic()

 def nzmath.poly.ring.PolynomialRing.getCharacteristic ( self )
```Return characteristic of the ring.
```

Reimplemented from nzmath.ring.Ring.

Definition at line 160 of file ring.py.

## ◆ getCoefficientRing()

 def nzmath.poly.ring.PolynomialRing.getCoefficientRing ( self )

## ◆ getCommonSuperring()

 def nzmath.poly.ring.PolynomialRing.getCommonSuperring ( self, other )

## ◆ getInstance()

 def nzmath.poly.ring.PolynomialRing.getInstance ( cls, coeffring, number_of_variables = `1` )
```Return an instance of the class with specified coefficient ring
and number of variables.
```

Definition at line 255 of file ring.py.

## ◆ getQuotientField()

 def nzmath.poly.ring.PolynomialRing.getQuotientField ( self )
```Return the quotient field of the ring if coefficient ring has
its quotient field.  Otherwise, an exception will be raised.
```

Reimplemented from nzmath.ring.CommutativeRing.

Definition at line 47 of file ring.py.

## ◆ issubring()

 def nzmath.poly.ring.PolynomialRing.issubring ( self, other )
```reports whether another ring contains this polynomial ring.
```

Reimplemented from nzmath.ring.Ring.

Definition at line 105 of file ring.py.

## ◆ issuperring()

 def nzmath.poly.ring.PolynomialRing.issuperring ( self, other )

## ◆ _instances

 dictionary nzmath.poly.ring.PolynomialRing._instances = {}
staticprivate

Definition at line 18 of file ring.py.

## ◆ _one

 nzmath.poly.ring.PolynomialRing._one
private

## ◆ _zero

 nzmath.poly.ring.PolynomialRing._zero
private

## ◆ one

 nzmath.poly.ring.PolynomialRing.one = property(_get_one, None, None, "multiplicative unit")
static

Definition at line 221 of file ring.py.

## ◆ zero

 nzmath.poly.ring.PolynomialRing.zero = property(_get_zero, None, None, "additive unit")
static

Definition at line 229 of file ring.py.

Referenced by nzmath.ring.Field.gcd().

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