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

Public Member Functions

def __init__ (self, representative, modulus)
 
def __repr__ (self)
 
def __mul__ (self, other)
 
def __rmul__ (self, other)
 
def __div__ (self, other)
 
def __mod__ (self, other)
 
def __divmod__ (self, other)
 
def __rdiv__ (self, other)
 
def __add__ (self, other)
 
def __sub__ (self, other)
 
def __rsub__ (self, other)
 
def __pow__ (self, other)
 
def __neg__ (self)
 
def __pos__ (self)
 
def __nonzero__ (self)
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 
def __hash__ (self)
 
def inverse (self)
 
def getModulus (self)
 
def getResidue (self)
 
def minimumNonNegative (self)
 
def minimumAbsolute (self)
 
def getRing (self)
 
- Public Member Functions inherited from nzmath.ring.CommutativeRingElement
def __init__ (self)
 
def mul_module_action (self, other)
 
def exact_division (self, other)
 
- Public Member Functions inherited from nzmath.ring.RingElement
def __init__ (self, *args, **kwd)
 

Public Attributes

 m
 
 n
 

Static Public Attributes

def toInteger = minimumNonNegative
 

Static Private Attributes

def __floordiv__ = __div__
 
def __radd__ = __add__
 

Detailed Description

A class for integer residue class.

Definition at line 12 of file intresidue.py.

Constructor & Destructor Documentation

◆ __init__()

def nzmath.intresidue.IntegerResidueClass.__init__ (   self,
  representative,
  modulus 
)

Definition at line 16 of file intresidue.py.

Member Function Documentation

◆ __add__()

◆ __div__()

◆ __divmod__()

def nzmath.intresidue.IntegerResidueClass.__divmod__ (   self,
  other 
)

Definition at line 99 of file intresidue.py.

◆ __eq__()

◆ __hash__()

def nzmath.intresidue.IntegerResidueClass.__hash__ (   self)
hash so that if a == b then hash(a) == hash(b).

Reimplemented from nzmath.ring.RingElement.

Definition at line 177 of file intresidue.py.

References nzmath.intresidue.IntegerResidueClass.n, and nzmath.finitefield.FinitePrimeFieldElement.n.

◆ __mod__()

def nzmath.intresidue.IntegerResidueClass.__mod__ (   self,
  other 
)
Return zero if division by other is allowed

Definition at line 93 of file intresidue.py.

◆ __mul__()

◆ __ne__()

def nzmath.intresidue.IntegerResidueClass.__ne__ (   self,
  other 
)
Inequality test.

Reimplemented from nzmath.ring.RingElement.

Definition at line 174 of file intresidue.py.

◆ __neg__()

◆ __nonzero__()

def nzmath.intresidue.IntegerResidueClass.__nonzero__ (   self)

◆ __pos__()

◆ __pow__()

◆ __rdiv__()

◆ __repr__()

def nzmath.intresidue.IntegerResidueClass.__repr__ (   self)

◆ __rmul__()

def nzmath.intresidue.IntegerResidueClass.__rmul__ (   self,
  other 
)

◆ __rsub__()

◆ __sub__()

◆ getModulus()

def nzmath.intresidue.IntegerResidueClass.getModulus (   self)

Definition at line 189 of file intresidue.py.

References nzmath.intresidue.IntegerResidueClass.m.

◆ getResidue()

def nzmath.intresidue.IntegerResidueClass.getResidue (   self)

◆ getRing()

def nzmath.intresidue.IntegerResidueClass.getRing (   self)
getRing returns an object of a subclass of Ring,
to which the element belongs.

Reimplemented from nzmath.ring.RingElement.

Reimplemented in nzmath.finitefield.FinitePrimeFieldElement.

Definition at line 214 of file intresidue.py.

References nzmath.intresidue.IntegerResidueClass.m.

Referenced by nzmath.poly.multiutil.RingPolynomial.__add__(), nzmath.ring.QuotientFieldElement.__add__(), nzmath.poly.uniutil.RingPolynomial.__add__(), nzmath.ring.QuotientFieldElement.__eq__(), nzmath.poly.uniutil.FieldPolynomial.__pow__(), nzmath.poly.multiutil.RingPolynomial.__radd__(), nzmath.poly.uniutil.RingPolynomial.__radd__(), nzmath.poly.multiutil.RingPolynomial.__rsub__(), nzmath.ring.QuotientFieldElement.__rsub__(), nzmath.poly.uniutil.RingPolynomial.__rsub__(), nzmath.ring.QuotientFieldElement.__rtruediv__(), nzmath.poly.multiutil.RingPolynomial.__sub__(), nzmath.ring.QuotientFieldElement.__sub__(), nzmath.poly.uniutil.RingPolynomial.__sub__(), nzmath.ring.QuotientFieldElement.__truediv__(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider._small_index_mod_pow(), nzmath.ring.CommutativeRingElement.exact_division(), nzmath.poly.uniutil.DivisionProvider.extgcd(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.factor(), nzmath.poly.uniutil.DivisionProvider.mod_pow(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.mod_pow(), nzmath.poly.uniutil.PseudoDivisionProvider.monic_pow(), nzmath.ring.CommutativeRingElement.mul_module_action(), and nzmath.poly.uniutil.SubresultantGcdProvider.subresultant_gcd().

◆ inverse()

◆ minimumAbsolute()

def nzmath.intresidue.IntegerResidueClass.minimumAbsolute (   self)
Return the minimum absolute representative integer of the
residue class.

Definition at line 204 of file intresidue.py.

References nzmath.intresidue.IntegerResidueClass.m, nzmath.intresidue.IntegerResidueClass.n, and nzmath.finitefield.FinitePrimeFieldElement.n.

◆ minimumNonNegative()

def nzmath.intresidue.IntegerResidueClass.minimumNonNegative (   self)
Return the smallest non-negative representative element of the
residue class.

Definition at line 195 of file intresidue.py.

References nzmath.intresidue.IntegerResidueClass.m, nzmath.intresidue.IntegerResidueClass.n, and nzmath.finitefield.FinitePrimeFieldElement.n.

Member Data Documentation

◆ __floordiv__

def nzmath.intresidue.IntegerResidueClass.__floordiv__ = __div__
staticprivate

Definition at line 91 of file intresidue.py.

◆ __radd__

def nzmath.intresidue.IntegerResidueClass.__radd__ = __add__
staticprivate

Definition at line 123 of file intresidue.py.

◆ m

nzmath.intresidue.IntegerResidueClass.m

Definition at line 22 of file intresidue.py.

Referenced by nzmath.intresidue.IntegerResidueClass.__add__(), nzmath.intresidue.IntegerResidueClassRing.__contains__(), nzmath.intresidue.IntegerResidueClass.__div__(), nzmath.intresidue.IntegerResidueClass.__eq__(), nzmath.intresidue.IntegerResidueClassRing.__eq__(), nzmath.intresidue.IntegerResidueClassRing.__hash__(), nzmath.intresidue.IntegerResidueClass.__mul__(), nzmath.intresidue.IntegerResidueClass.__neg__(), nzmath.intresidue.IntegerResidueClass.__pos__(), nzmath.intresidue.IntegerResidueClass.__pow__(), nzmath.intresidue.IntegerResidueClass.__rdiv__(), nzmath.intresidue.IntegerResidueClass.__repr__(), nzmath.finitefield.FinitePrimeFieldElement.__repr__(), nzmath.intresidue.IntegerResidueClassRing.__repr__(), nzmath.intresidue.IntegerResidueClass.__rsub__(), nzmath.finitefield.FinitePrimeFieldElement.__str__(), nzmath.intresidue.IntegerResidueClassRing.__str__(), nzmath.intresidue.IntegerResidueClass.__sub__(), nzmath.intresidue.IntegerResidueClassRing.card(), nzmath.intresidue.IntegerResidueClassRing.createElement(), nzmath.intresidue.IntegerResidueClassRing.getCharacteristic(), nzmath.intresidue.IntegerResidueClass.getModulus(), nzmath.finitefield.FinitePrimeFieldElement.getRing(), nzmath.intresidue.IntegerResidueClass.getRing(), nzmath.intresidue.IntegerResidueClass.inverse(), nzmath.intresidue.IntegerResidueClassRing.isfield(), nzmath.intresidue.IntegerResidueClass.minimumAbsolute(), and nzmath.intresidue.IntegerResidueClass.minimumNonNegative().

◆ n

◆ toInteger

def nzmath.intresidue.IntegerResidueClass.toInteger = minimumNonNegative
static

Definition at line 202 of file intresidue.py.


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