|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.perisic.ring.Ring com.perisic.ring.F2Field
public class 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, 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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static F2Field F2
Method Detail |
---|
public boolean isField()
Ring
Note for implementing a child class of Ring: Must be overridden in a field.
isField
in class Ring
public java.lang.String toString()
toString
in class java.lang.Object
public boolean toBoolean(RingElt a)
public RingElt add(RingElt a, RingElt b)
add
in class Ring
public RingElt mult(RingElt a, RingElt b)
mult
in class Ring
public RingElt zero()
zero
in class Ring
public RingElt neg(RingElt a)
neg
in class Ring
public boolean equalZero(RingElt a)
equalZero
in class Ring
public RingElt one()
one
in class Ring
public RingElt inv(RingElt b) throws RingException
inv
in class Ring
RingException
public RingElt map(boolean b)
public RingElt map(RingElt b)
map
in class Ring
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |