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

## Public Member Functions

def __init__ (self)

def createElement (self, seed)

def getCharacteristic (self)

def issubring (self, other)

def issuperring (self, other)

def getCommonSuperring (self, other)

def __eq__ (self, other)

def __hash__ (self)

def __ne__ (self, other)

_one

_zero

## Detailed Description

```Ring is an abstract class which expresses that
the derived classes are (in mathematical meaning) rings.

Definition of ring is as follows:
Ring is a structure with addition and multiplication.  It is an
abelian group with addition, and a monoid with multiplication.
The multiplication obeys the distributive law.
```

Definition at line 8 of file ring.py.

## ◆ __init__()

 def nzmath.ring.Ring.__init__ ( self )
```Initialize _one and _zero for later use for properties 'one'
and 'zero'.
```

Definition at line 19 of file ring.py.

## ◆ __eq__()

 def nzmath.ring.Ring.__eq__ ( self, other )
```Equality test.
```

Definition at line 72 of file ring.py.

Referenced by nzmath.ring.Ring.__ne__(), and nzmath.ring.Ideal.__ne__().

## ◆ __hash__()

 def nzmath.ring.Ring.__hash__ ( self )

## ◆ createElement()

 def nzmath.ring.Ring.createElement ( self, seed )
```createElement returns an element of the ring with seed.
```

Definition at line 30 of file ring.py.

## ◆ getCharacteristic()

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

The Characteristic of a ring is the smallest positive integer
n s.t. n * a = 0 for any element a of the ring, or 0 if there
is no such natural number.
```

Definition at line 36 of file ring.py.

## ◆ getCommonSuperring()

 def nzmath.ring.Ring.getCommonSuperring ( self, other )

## ◆ issubring()

 def nzmath.ring.Ring.issubring ( self, other )
```Report whether another ring contains the ring as a subring.
```

Definition at line 46 of file ring.py.

## ◆ issuperring()

 def nzmath.ring.Ring.issuperring ( self, other )
```Report whether the ring is a superring of another ring.
```

Definition at line 52 of file ring.py.

Referenced by nzmath.ring.Ring.getCommonSuperring().

## ◆ _one

 nzmath.ring.Ring._one
private

Definition at line 27 of file ring.py.

Referenced by nzmath.ring.ResidueClassRing._getOne().

## ◆ _zero

 nzmath.ring.Ring._zero
private

Definition at line 28 of file ring.py.

Referenced by nzmath.ring.ResidueClassRing._getZero().

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