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

Public Member Functions

def __init__ (self)
 
def __contains__ (self, element)
 
def __eq__ (self, other)
 
def classNumber (self)
 
def getQuotientField (self)
 
def getCharacteristic (self)
 
def createElement (self, numerator, denominator=1)
 
def __str__ (self)
 
def __repr__ (self)
 
def __hash__ (self)
 
def issubring (self, other)
 
def issuperring (self, other)
 
def getCommonSuperring (self, other)
 
- Public Member Functions inherited from nzmath.ring.QuotientField
def __init__ (self, domain)
 
- Public Member Functions inherited from nzmath.ring.Field
def createElement (self, *args)
 
def isfield (self)
 
def gcd (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 registerModuleAction (self, action_ring, action)
 
def hasaction (self, action_ring)
 
def getaction (self, action_ring)
 
- Public Member Functions inherited from nzmath.ring.Ring
def createElement (self, seed)
 
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
 

Additional Inherited Members

- Public Attributes inherited from nzmath.ring.QuotientField
 basedomain
 
- Public Attributes inherited from nzmath.ring.CommutativeRing
 properties
 

Detailed Description

RationalField is a class of field of rationals.
The class has the single instance 'theRationalField'.

Definition at line 517 of file rational.py.

Constructor & Destructor Documentation

◆ __init__()

def nzmath.rational.RationalField.__init__ (   self)
Set field flag True of 'properties' attribute.

Reimplemented from nzmath.ring.Field.

Definition at line 523 of file rational.py.

Member Function Documentation

◆ __contains__()

def nzmath.rational.RationalField.__contains__ (   self,
  element 
)

Definition at line 526 of file rational.py.

References nzmath.rational.isIntegerObject().

◆ __eq__()

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

Reimplemented from nzmath.ring.Ring.

Definition at line 533 of file rational.py.

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

◆ __hash__()

def nzmath.rational.RationalField.__hash__ (   self)
Return a hash number (always 1).

Reimplemented from nzmath.ring.Ring.

Definition at line 565 of file rational.py.

◆ __repr__()

def nzmath.rational.RationalField.__repr__ (   self)

Definition at line 562 of file rational.py.

◆ __str__()

def nzmath.rational.RationalField.__str__ (   self)

Definition at line 559 of file rational.py.

◆ _getOne()

◆ _getZero()

◆ classNumber()

def nzmath.rational.RationalField.classNumber (   self)
The class number of the rational field is one.

Definition at line 539 of file rational.py.

◆ createElement()

def nzmath.rational.RationalField.createElement (   self,
  numerator,
  denominator = 1 
)
createElement returns a Rational object.
If the number of arguments is one, it must be an integer or a rational.
If the number of arguments is two, they must be integers.

Definition at line 551 of file rational.py.

Referenced by nzmath.finitefield.FiniteField.random_element(), and nzmath.finitefield.FiniteField.TonelliShanks().

◆ getCharacteristic()

def nzmath.rational.RationalField.getCharacteristic (   self)
The characteristic of the rational field is zero.

Reimplemented from nzmath.ring.Ring.

Definition at line 547 of file rational.py.

◆ getCommonSuperring()

◆ getQuotientField()

def nzmath.rational.RationalField.getQuotientField (   self)
getQuotientField returns the rational field itself.

Reimplemented from nzmath.ring.Field.

Definition at line 543 of file rational.py.

◆ issubring()

def nzmath.rational.RationalField.issubring (   self,
  other 
)
reports whether another ring contains the rational field as
subring.

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

Reimplemented from nzmath.ring.Ring.

Definition at line 571 of file rational.py.

Referenced by nzmath.ring.Ring.getCommonSuperring(), nzmath.rational.RationalField.getCommonSuperring(), and nzmath.rational.IntegerRing.getCommonSuperring().

◆ issuperring()

def nzmath.rational.RationalField.issuperring (   self,
  other 
)
reports whether the rational number field contains another
ring as subring.

If other is also the rational number field or the ring of
integer, 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 591 of file rational.py.

Referenced by nzmath.ring.Ring.getCommonSuperring(), nzmath.rational.RationalField.getCommonSuperring(), nzmath.rational.IntegerRing.getCommonSuperring(), and nzmath.real.RealField.issubring().

Member Data Documentation

◆ _one

◆ _zero

Property Documentation

◆ one

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

◆ zero

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

Definition at line 636 of file rational.py.

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


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