|
|||||||
| 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.F2Field
The finite prime field of characteristic 2. This is a wrapper class for the primitive data type boolean where "and" is the multiplcaton and "exclusive or" is the addition.
| Field Summary | |
static F2Field |
F2
The field F2. |
| Fields inherited from class com.perisic.ring.Ring |
C,
F2,
Q,
R,
Z |
| Method Summary | |
RingElt |
add(RingElt a,
RingElt b)
The addition a + b mod 2. |
boolean |
equalZero(RingElt a)
Returns true if a == 0. |
RingElt |
inv(RingElt b)
Returns b^-1. |
boolean |
isField()
Is the ring a field? By default false. |
RingElt |
map(boolean b)
Maps false to 0 and true to 1. |
RingElt |
map(RingElt b)
If b is a modular integer ring, such that the modulus maps to 0, the value of b is mapped to F2. |
RingElt |
mult(RingElt a,
RingElt b)
The multiplicaton a * b mod 2. |
RingElt |
neg(RingElt a)
Returns -a mod 2. |
RingElt |
one()
Returns the 1 of the ring. |
boolean |
toBoolean(RingElt a)
Returns the boolean value of a. |
java.lang.String |
toString()
Returns the String "F2". |
RingElt |
zero()
Returns 0 mod 2. |
| Methods inherited from class com.perisic.ring.Ring |
div,
ediv,
eltToString,
equal,
evaluatePolynomial,
gcd,
isEuclidian,
isUFD,
map,
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 |
| Field Detail |
public static F2Field F2
| Method Detail |
public boolean isField()
Note for implementing a child class of Ring: Must be overridden in a field.
public java.lang.String toString()
public boolean toBoolean(RingElt a)
public RingElt add(RingElt a,
RingElt b)
public RingElt mult(RingElt a,
RingElt b)
public RingElt zero()
public RingElt neg(RingElt a)
public boolean equalZero(RingElt a)
public RingElt one()
public RingElt inv(RingElt b)
throws RingException
public RingElt map(boolean b)
public RingElt map(RingElt b)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||