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

## Public Member Functions

def __init__ (self)

def __contains__ (self, element)

def __eq__ (self, other)

def getQuotientField (self)

def createElement (self, seed)

def __str__ (self)

def __repr__ (self)

def __hash__ (self)

def getCharacteristic (self)

def issubring (self, other)

def issuperring (self, other)

def getCommonSuperring (self, other)

def gcd (self, n, m)

def lcm (self, a, b)

def extgcd (self, a, b)

Public Member Functions inherited from nzmath.ring.CommutativeRing
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 Member Functions inherited from nzmath.ring.Ring
def __ne__ (self, other)

## Properties

one = property(_getOne, None, None, "multiplicative unit.")

zero = property(_getZero, None, None, "additive unit.")

## Private Member Functions

def _getOne (self)

def _getZero (self)

## Private Attributes

_one

_zero

Public Attributes inherited from nzmath.ring.CommutativeRing
properties

## Detailed Description

```IntegerRing is a class of ring of rational integers.
The class has the single instance 'theIntegerRing'.
```

Definition at line 789 of file rational.py.

## ◆ __init__()

 def nzmath.rational.IntegerRing.__init__ ( self )
```Initialize 'properties' attribute by an object of
CommutativeRingProperties.
```

Reimplemented from nzmath.ring.CommutativeRing.

Definition at line 795 of file rational.py.

References nzmath.ring.CommutativeRing.properties.

## ◆ __contains__()

 def nzmath.rational.IntegerRing.__contains__ ( self, element )
````in' operator is provided for checking an object be in the
rational integer ring mathematically.  To check an object be
an integer object in Python, please use isIntegerObject.
```

Definition at line 800 of file rational.py.

References nzmath.rational.isIntegerObject().

## ◆ __eq__()

 def nzmath.rational.IntegerRing.__eq__ ( self, other )
```Equality test.
```

Reimplemented from nzmath.ring.Ring.

Definition at line 811 of file rational.py.

## ◆ __hash__()

 def nzmath.rational.IntegerRing.__hash__ ( self )
```Return a hash number (always 0).
```

Reimplemented from nzmath.ring.Ring.

Definition at line 836 of file rational.py.

## ◆ __repr__()

 def nzmath.rational.IntegerRing.__repr__ ( self )

Definition at line 833 of file rational.py.

## ◆ __str__()

 def nzmath.rational.IntegerRing.__str__ ( self )

Definition at line 830 of file rational.py.

## ◆ _getOne()

 def nzmath.rational.IntegerRing._getOne ( self )
private

## ◆ _getZero()

 def nzmath.rational.IntegerRing._getZero ( self )
private

## ◆ createElement()

 def nzmath.rational.IntegerRing.createElement ( self, seed )
```createElement returns an Integer object with seed,
which must be an integer.
```

Reimplemented from nzmath.ring.Ring.

Definition at line 823 of file rational.py.

## ◆ extgcd()

 def nzmath.rational.IntegerRing.extgcd ( self, a, b )
```Return a tuple (u, v, d); they are the greatest common divisor
d of two given integers x and y and u, v such that
d = x * u + y * v.
```

Definition at line 902 of file rational.py.

## ◆ gcd()

 def nzmath.rational.IntegerRing.gcd ( self, n, m )
```Return the greatest common divisor of given 2 integers.
```

Definition at line 888 of file rational.py.

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

## ◆ getCharacteristic()

 def nzmath.rational.IntegerRing.getCharacteristic ( self )
```The characteristic of the integer ring is zero.
```

Reimplemented from nzmath.ring.Ring.

Definition at line 842 of file rational.py.

## ◆ getCommonSuperring()

 def nzmath.rational.IntegerRing.getCommonSuperring ( self, other )

## ◆ getQuotientField()

 def nzmath.rational.IntegerRing.getQuotientField ( self )
```getQuotientField returns the rational field.
```

Reimplemented from nzmath.ring.CommutativeRing.

Definition at line 817 of file rational.py.

## ◆ issubring()

 def nzmath.rational.IntegerRing.issubring ( self, other )
```reports whether another ring contains the integer ring as
subring.

If other is also the integer ring, the output is True.  In
other cases it depends on the implementation of another ring's
issuperring method.
```

Reimplemented from nzmath.ring.Ring.

Definition at line 848 of file rational.py.

## ◆ issuperring()

 def nzmath.rational.IntegerRing.issuperring ( self, other )
```reports whether the integer ring contains another ring as
subring.

If other is also the integer ring, the output is True.  In
other cases it depends on the implementation of another ring's
issubring method.
```

Reimplemented from nzmath.ring.Ring.

Definition at line 861 of file rational.py.

## ◆ lcm()

 def nzmath.rational.IntegerRing.lcm ( self, a, b )
```Return the least common multiple of given 2 integers.
If both are zero, it raises an exception.
```

Definition at line 895 of file rational.py.

## ◆ _one

 nzmath.rational.IntegerRing._one
private

Definition at line 913 of file rational.py.

## ◆ _zero

 nzmath.rational.IntegerRing._zero
private

Definition at line 921 of file rational.py.

## ◆ one

 nzmath.rational.IntegerRing.one = property(_getOne, None, None, "multiplicative unit.")
static

Definition at line 916 of file rational.py.

## ◆ zero

 nzmath.rational.IntegerRing.zero = property(_getZero, None, None, "additive unit.")
static

Definition at line 924 of file rational.py.

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

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