|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--HFE.SquarePolyVec
This class provides a vector of polynomials of degree one in n independent variables.
The polynomials are over the finite field GF(2) each. As all these
polynomials are processed in parallel, the coefficients
are represented in terms of Field2_n
each.
Field Summary | |
private Field2_n[] |
coeff
Coefficients for the variables. |
static int |
coeffNum
The number of coefficients in this polynomial |
static int |
elemNum
The number of rows in this vector. |
private static Field2_n |
mulTmp1
Static register for multiplication of two vectors |
private static Field2_n |
mulTmp2
|
static int |
varNum
The number of variables in this polynomial. |
Constructor Summary | |
SquarePolyVec()
Initializes all coefficients to zero. |
|
SquarePolyVec(AffinePolyVec father)
Creates a copy from the given affine polynomial. |
|
SquarePolyVec(AffinePolyVec fac1,
AffinePolyVec fac2)
Creates a new object as the product of two given affine polynomials |
|
SquarePolyVec(SquarePolyVec father)
Creates a copy from the given polynomial. |
Method Summary | |
void |
add(AffinePolyVec whom)
calculate this += whom as polynomial addition |
void |
add(SquarePolyVec whom)
calculate this += whom as polynomial addition |
void |
add(SquarePolyVec a,
SquarePolyVec b)
calculates this = a + b as polynomial addition |
void |
apply(Field2_n res,
Field2_n value)
Evaluate the polynomial using the given value vector The entry value[0] is _not_ uses, value[1] is the first valid entry. |
void |
apply(Field2_n res,
int[] values)
Evaluate the polynomial using the given value vector The entry value[0] is _not_ uses, value[1] is the first valid entry. |
Field2_n |
coeff(int which)
Returns the coefficients for a given variable. |
Field2_n[] |
coeffs()
returns the coefficient array without copying it. |
void |
copy(SquarePolyVec father)
Copies the coefficients from another polynomial vector |
void |
initMem()
Allocates new memory for the coefficients. |
boolean |
isEqual(SquarePolyVec whom)
Compares this and whom coefficientwise. |
static void |
main(java.lang.String[] args)
Mainly invoces the testIt() method. |
void |
mul(AffinePolyVec fac1,
AffinePolyVec fac2)
res = fac1*fac2 in terms of affine polynomial vector multiplication |
void |
mul(Field2_n fac)
this *= fac in terms of quadratic polynomial vector multiplication |
void |
mulSlow(AffinePolyVec fac1,
AffinePolyVec fac2)
res = fac1*fac2 in terms of affine polynomial vector multiplication. |
void |
rnd(java.util.Random rnd)
Initializes all coefficients with random bits |
void |
setCoeffs(Field2_n[] inArray)
Sets all the coefficients by the given array. |
void |
setZero()
Sets all the coefficients to zero |
static void |
speedIt()
Tests how fast the package runs on the current hardware. |
void |
sub(SquarePolyVec whom)
calculate this -= whom as polynomial subtraction |
void |
sub(SquarePolyVec a,
SquarePolyVec b)
calculates this = a - b as polynomial subtraction |
static void |
testIt()
Tests the functionality for the whole class. |
void |
transform2poly(Transform2 inTransform)
Transforms an affine transformation into an affine polynomial vector. |
void |
writeString()
Writes the polynomials as a string to stdout |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static int varNum
public static int coeffNum
public static int elemNum
private Field2_n[] coeff
coeffNum
. Position 0
is for the constant terms.private static Field2_n mulTmp1
private static Field2_n mulTmp2
Constructor Detail |
public SquarePolyVec()
public SquarePolyVec(SquarePolyVec father)
public SquarePolyVec(AffinePolyVec father)
public SquarePolyVec(AffinePolyVec fac1, AffinePolyVec fac2)
Method Detail |
public Field2_n coeff(int which)
public Field2_n[] coeffs()
public boolean isEqual(SquarePolyVec whom)
public void setZero()
public void initMem()
public void rnd(java.util.Random rnd)
public void copy(SquarePolyVec father)
public void setCoeffs(Field2_n[] inArray)
public void transform2poly(Transform2 inTransform)
inTransform
- affine tranformationpublic void add(SquarePolyVec a, SquarePolyVec b)
public void add(AffinePolyVec whom)
public void add(SquarePolyVec whom)
public void sub(SquarePolyVec a, SquarePolyVec b)
public void sub(SquarePolyVec whom)
public void apply(Field2_n res, int[] values)
res
- value of the current polynimial vector.values
- array with varNum+1 entriespublic void apply(Field2_n res, Field2_n value)
res
- value of the current polynimial vector.value
- array with varNum entries as Field2_n
elementpublic void mul(Field2_n fac)
public void mul(AffinePolyVec fac1, AffinePolyVec fac2)
public void mulSlow(AffinePolyVec fac1, AffinePolyVec fac2)
public void writeString()
public static void testIt()
public static final void speedIt()
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 |