|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--HFE.Poly4Max
This class provides polynomials of positive degree over
the finite field F_4 which is provided in the class Field4
.
It also provides addition, multiplication and modulo-operations
The maximal degree of the polynomials is fixed by the constant
maxLen
Field Summary | |
static int |
maxLen
Maximal length of the polynomials |
private static Poly4Max |
modulus
Modulus for the mod version of the operations |
private int[] |
value
Current value of the polynomial. |
Constructor Summary | |
(package private) |
Poly4Max()
sets all the coefficients to zero |
(package private) |
Poly4Max(int initValue)
Creates a new polynomial. |
(package private) |
Poly4Max(int[] inArray)
array2poly(int[]) |
(package private) |
Poly4Max(Poly4Max father)
Creates a copy from the given polynomial |
(package private) |
Poly4Max(Poly4Max father,
int shift)
Takes one polynomial and shifts it by the given shift. |
Method Summary | |
(package private) void |
add(Poly4Max whom)
calculate this += whom as polynomial addition |
(package private) void |
add(Poly4Max a,
Poly4Max b)
calculates this = wen1 + wen2 as polynomial addition |
(package private) void |
addMod(Poly4Max b)
Computes this = (this+b)%modul. |
(package private) void |
addMod(Poly4Max a,
Poly4Max b)
Computes this = (a+b)%modul. |
(package private) void |
array2poly(int[] inArray)
Sets the coefficients using the given coefficient / power array. |
(package private) int |
coeff(int which)
Returns te coefficient for a given degree which (i.e. |
(package private) int |
degree()
Returns the degree of the object. |
(package private) static void |
findIrr()
Find all irreducible polynomials. |
(package private) void |
int2poly(int intValue)
Sets the coefficients according to intValue. |
(package private) boolean |
isBigger(Poly4Max whom)
Compares the current polynomial with the given one. |
(package private) boolean |
isEqual(Poly4Max whom)
Compares the current polynomial with the given one. |
(package private) static void |
isIrr(int poly)
Tests if a given polynomial (specified as a number, see int2poly(int) ) is irreducible. |
(package private) boolean |
isLess(Poly4Max whom)
Compares the current polynomial with the given one. |
(package private) boolean |
isZero()
Checks if a polynomial is the zero polynomial. |
static void |
main(java.lang.String[] args)
Mainly invoces the testIt() method. |
(package private) void |
mod()
Calculates this %= moduls. |
(package private) void |
mod(Poly4Max b)
Calculates this %= b |
(package private) void |
mod(Poly4Max a,
Poly4Max b)
Calculates this = a % b |
(package private) void |
mul(Poly4Max a,
Poly4Max b)
calculates this = a * b as polynomial addition. |
(package private) void |
mulFactor(int factor)
multiplies all coefficients by the given factor in F_4. |
(package private) void |
mulMod(Poly4Max a,
Poly4Max b)
Computes this = (a*b)%modul. |
(package private) static void |
plotFunction()
|
(package private) int |
polyInt()
Returns the polynomial as an integer. |
(package private) void |
pow(Poly4Max base,
int by)
calculates this = base^by. |
(package private) void |
powMod(Poly4Max base,
int by)
Computes this = (base^by)%modul. |
(package private) static void |
rootBeta()
|
(package private) static void |
rootFunction()
|
(package private) static void |
setModulus(Poly4Max newModulus)
Sets the private field modulus. |
(package private) void |
setZero()
Sets all the coefficients to zero by allocating new memory |
(package private) static void |
testIt()
Tests the functionality for the whole class. |
(package private) void |
writeString()
Writes the polynomial as a string to stdout |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int maxLen
private static Poly4Max modulus
private int[] value
Constructor Detail |
Poly4Max()
Poly4Max(int initValue)
int2poly(int)
Poly4Max(Poly4Max father)
Poly4Max(Poly4Max father, int shift)
Poly4Max(int[] inArray)
array2poly(int[])
Method Detail |
static void setModulus(Poly4Max newModulus)
int degree()
int coeff(int which)
boolean isLess(Poly4Max whom)
boolean isBigger(Poly4Max whom)
boolean isEqual(Poly4Max whom)
boolean isZero()
void setZero()
void int2poly(int intValue)
void array2poly(int[] inArray)
void mulFactor(int factor)
void add(Poly4Max a, Poly4Max b)
void add(Poly4Max whom)
void mul(Poly4Max a, Poly4Max b)
void pow(Poly4Max base, int by)
void mod()
void mod(Poly4Max a, Poly4Max b)
void mod(Poly4Max b)
void addMod(Poly4Max a, Poly4Max b)
void addMod(Poly4Max b)
void mulMod(Poly4Max a, Poly4Max b)
void powMod(Poly4Max base, int by)
void writeString()
int polyInt()
static void testIt()
static void plotFunction()
static void rootFunction()
static void rootBeta()
static void isIrr(int poly)
int2poly(int)
) is irreducible.
If so, prints it to stdout.static void findIrr()
public static void main(java.lang.String[] args)
testIt()
method.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |