nzmath.rational

IntegerRing class

The class is for the ring of rational integers.

Ths class is a subclass of nzmath.ring.CommutativeRing.

constructor

IntegerRing()

Create an instance of IntegerRing. You may not want to create an instance, since there is already theIntegerRing.

methods

createElement(seed)

Return an Integer object with seed, which must be an integer.

gcd(n, m)

Return the greatest common divisor of given 2 integers.

getQuotientField()

Return the rational field (RationalField).

issubring(other)

Report 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.

issuperring(other)

Report 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.

lcm(a, b)

Return the lowest common multiple of given 2 integers. If both are zero, it raises an exception.

Methods inherited from nzmath.ring.CommutativeRing:

isdomain(), iseuclidean(), isfield(), isnoetherian(), ispid(), isufd()

Operators

repr, str, in

Properties

(These properties are new in 0.4.1)


Last-modified: 2005-09-28 (¿å) 13:50:47