** Next:** Matrices and Vectors
** Up:** Finite Fields
** Previous:** Finite Fields
** Contents**

In a general case, linear codes can encrypt elements of any finite
field. When encoding html documents, all of the data elements will
be elements of the field
, 1s and 0s. The first
classes in the LinearCodes package, the package that will contain
the applets for displaying the different linear codes and encoding
webpages, will be the classes defining finite field elements and
their operations.
__FieldElem Class__
The first step in defining the finite field data elements is
identifying what kind of field elements we need to use. Generally we
want our codes to be able to handel any field element. For this
reason I wrote an abstract class, FieldElem, that listed all the
methods and instance variables that I wanted any type of field
element to have. I wrote methods to add, multiply, get the inverse
or negative of, and return the one or zero in the field of any given
field element.
Below is a link to the java file for the FieldElem class.
FieldElem.java
__FieldOps Class__
Secondly, we need a class of static operations that will take and
return any type of field elements. Ideally, this static class would
throw errors in methods that were passed arguments of mismtching
fields. Because we will only ever be using
elements, I was not concerned with writing or handling errors. If
this package was extended to include different field elements, which
is provided for by the abstract class FieldElem, all methods would
have to verify that the elements passed to them were members of the
same field. The FieldOps class has many methods similar to those
included in the FieldElem class. The important difference between
the methods in each class is that FieldOps methods are static. This
means that the FieldOps methods will return new field elements. By
using the FieldOps methods in later classes, we can create new field
elements without altering the field element arguments that we pass
to the methods.
Below is a link to the java file for the FieldOps class.
FieldOps.java
__FPElem Class__
In the linear codes package there is one class that extends
FieldElem. The FPElem class constructs finite field elements of base
. FPElem implements all the methods in FieldElem, but like in
FieldOps none of these methods throw or catch errors. All of the
other classes in the LinearCodes package take and return arguments
of the type FieldElem, but both the encoding and code display
applets will only use arguments of type FPElem with base 2. In the
applets displaying FPElem data elements, the elements are shown as
''( number1 % number2 )", where number1 is the value of the element
and number2 is the base.
Below is a link to the java file for the FPElem class.
FPElem.java

** Next:** Matrices and Vectors
** Up:** Finite Fields
** Previous:** Finite Fields
** Contents**
Frederick Leitner
2004-09-01