|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--com.perisic.ring.Ring
|
+--com.perisic.ring.RationalField
The field Q of rational numbers. The only instance of this field is Ring.Q
| Fields inherited from class com.perisic.ring.Ring |
C,
F2,
Q,
R,
Z |
| Method Summary | |
RingElt |
add(RingElt a,
RingElt b)
Returns a + b. |
RingElt |
construct(java.math.BigInteger numerator,
java.math.BigInteger denominator)
Returns numerator/denominator. |
static java.math.BigInteger |
denominatorToBigInteger(RingElt b)
Returns the denominator s if b = r/s. |
boolean |
equalZero(RingElt b)
True if b == 0. |
RingElt |
inv(RingElt b)
Returns the multiplicative inverse. |
boolean |
isField()
Returns true. |
static boolean |
isIntegral(RingElt b)
true if denominator of b equals 1. |
RingElt |
map(RingElt a)
Maps Ring.Z elements and into this. |
RingElt |
map(java.lang.String a)
Maps the String a of the form xxxxx/yyyyy and xxxxxx into this field. |
RingElt |
mult(RingElt a,
RingElt b)
Returns a * b. |
RingElt |
neg(RingElt b)
Returns -b. |
static java.math.BigInteger |
numeratorToBigInteger(RingElt b)
Returns the numerator r if b = r/s. |
RingElt |
one()
Returns 1. |
java.lang.String |
toString()
Returns "Q". |
RingElt |
zero()
Returns 0. |
| Methods inherited from class com.perisic.ring.Ring |
div,
ediv,
eltToString,
equal,
evaluatePolynomial,
gcd,
isEuclidian,
isUFD,
map,
map,
map,
mod,
pow,
pow,
sub,
tdiv |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Method Detail |
public boolean isField()
public RingElt add(RingElt a,
RingElt b)
public RingElt mult(RingElt a,
RingElt b)
public RingElt one()
public RingElt zero()
public RingElt inv(RingElt b)
public RingElt neg(RingElt b)
public boolean equalZero(RingElt b)
public RingElt map(RingElt a)
public java.lang.String toString()
public static boolean isIntegral(RingElt b)
public static java.math.BigInteger numeratorToBigInteger(RingElt b)
public static java.math.BigInteger denominatorToBigInteger(RingElt b)
public RingElt construct(java.math.BigInteger numerator,
java.math.BigInteger denominator)
public RingElt map(java.lang.String a)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||