NZMATH
1.2.0
About: NZMATH is a Python based number theory oriented calculation system.
![]() ![]() |
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) |
![]() | |
def | __init__ (self, domain) |
![]() | |
def | createElement (self, *args) |
def | isfield (self) |
def | gcd (self, a, b) |
![]() | |
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) |
![]() | |
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 | |
![]() | |
basedomain | |
![]() | |
properties | |
RationalField is a class of field of rationals. The class has the single instance 'theRationalField'.
Definition at line 517 of file rational.py.
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.
def nzmath.rational.RationalField.__contains__ | ( | self, | |
element | |||
) |
Definition at line 526 of file rational.py.
References nzmath.rational.isIntegerObject().
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__().
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.
def nzmath.rational.RationalField.__repr__ | ( | self | ) |
Definition at line 562 of file rational.py.
def nzmath.rational.RationalField.__str__ | ( | self | ) |
Definition at line 559 of file rational.py.
|
private |
Definition at line 622 of file rational.py.
References nzmath.imaginary.ComplexField._one, nzmath.poly.ring.PolynomialRing._one, nzmath.algfield.NumberField._one, nzmath.intresidue.IntegerResidueClassRing._one, nzmath.finitefield.FinitePrimeField._one, nzmath.poly.multiutil.PolynomialRingAnonymousVariables._one, nzmath.poly.ring.RationalFunctionField._one, nzmath.rational.RationalField._one, nzmath.finitefield.ExtendedField._one, and nzmath.matrix.MatrixRing._one.
|
private |
Definition at line 630 of file rational.py.
References nzmath.imaginary.ComplexField._zero, nzmath.poly.ring.PolynomialRing._zero, nzmath.intresidue.IntegerResidueClassRing._zero, nzmath.algfield.NumberField._zero, nzmath.finitefield.FinitePrimeField._zero, nzmath.poly.multiutil.PolynomialRingAnonymousVariables._zero, nzmath.poly.ring.RationalFunctionField._zero, nzmath.rational.RationalField._zero, nzmath.finitefield.ExtendedField._zero, and nzmath.matrix.MatrixRing._zero.
def nzmath.rational.RationalField.classNumber | ( | self | ) |
The class number of the rational field is one.
Definition at line 539 of file rational.py.
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().
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.
def nzmath.rational.RationalField.getCommonSuperring | ( | self, | |
other | |||
) |
Return common superring of the ring and another ring.
Reimplemented from nzmath.ring.Ring.
Definition at line 608 of file rational.py.
References nzmath.poly.ring.PolynomialRing.issubring(), nzmath.finitefield.FinitePrimeField.issubring(), nzmath.imaginary.ComplexField.issubring(), nzmath.algfield.NumberField.issubring(), nzmath.intresidue.IntegerResidueClassRing.issubring(), nzmath.poly.multiutil.PolynomialRingAnonymousVariables.issubring(), nzmath.poly.ring.RationalFunctionField.issubring(), nzmath.rational.RationalField.issubring(), nzmath.finitefield.ExtendedField.issubring(), nzmath.matrix.MatrixRing.issubring(), nzmath.poly.ring.PolynomialRing.issuperring(), nzmath.imaginary.ComplexField.issuperring(), nzmath.finitefield.FinitePrimeField.issuperring(), nzmath.algfield.NumberField.issuperring(), nzmath.intresidue.IntegerResidueClassRing.issuperring(), nzmath.poly.multiutil.PolynomialRingAnonymousVariables.issuperring(), nzmath.poly.ring.RationalFunctionField.issuperring(), nzmath.rational.RationalField.issuperring(), nzmath.finitefield.ExtendedField.issuperring(), and nzmath.matrix.MatrixRing.issuperring().
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.
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().
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().
|
private |
Definition at line 625 of file rational.py.
Referenced by nzmath.real.RealField._getOne(), nzmath.ring.ResidueClassRing._getOne(), nzmath.rational.RationalField._getOne(), and nzmath.rational.IntegerRing._getOne().
|
private |
Definition at line 633 of file rational.py.
Referenced by nzmath.real.RealField._getZero(), nzmath.ring.ResidueClassRing._getZero(), nzmath.rational.RationalField._getZero(), and nzmath.rational.IntegerRing._getZero().
|
static |
Definition at line 628 of file rational.py.
Referenced by nzmath.ring.Field.gcd(), nzmath.finitefield.FiniteField.Legendre(), nzmath.finitefield.FiniteField.order(), nzmath.finitefield.FiniteField.sqrt(), and nzmath.finitefield.FiniteField.TonelliShanks().
|
static |
Definition at line 636 of file rational.py.
Referenced by nzmath.ring.Field.gcd().