|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--HFE.AffinePolyVec
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 |
elemNum
The number of rows in this vector. |
static int |
varNum
The number of variables in this polynomial. |
Constructor Summary | |
AffinePolyVec()
Initializes all coefficients to zero. |
|
AffinePolyVec(AffinePolyVec father)
Creates a copy from the given polynomial. |
|
AffinePolyVec(Transform2 inTransform)
transform2poly(HFE.Transform2) |
Method Summary | |
void |
add(AffinePolyVec whom)
calculate this += whom as polynomial addition |
void |
add(AffinePolyVec a,
AffinePolyVec b)
calculates this = a + b as polynomial addition |
void |
apply(Field2_n res,
Field2_n value)
Evaluate the polynomial using the given value vector |
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. |
void |
applyLinear(Field2_n res,
Field2_n value)
Evaluate the polynomial using the given value vector. |
Field2_n |
coeff(int which)
Returns the coefficients for a given variable. |
Field2_n[] |
coeffs()
returns the coefficient array without copying it. |
void |
initMem()
Allocates new memory for the coefficients. |
boolean |
isEqual(AffinePolyVec whom)
Compares this and whom coefficientwise. |
static void |
main(java.lang.String[] args)
Mainly invoces the testIt() method. |
void |
mul(AffinePolyVec res,
Field2_n fac)
res = fac*this 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 |
AffinePolyVec |
sqr()
Computes an affine polynomial vector which is exactly a squaring of the original one. |
void |
sub(AffinePolyVec whom)
calculate this -= whom as polynomial subtraction |
void |
sub(AffinePolyVec a,
AffinePolyVec 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 elemNum
private Field2_n[] coeff
varNum
. Position 0
is for the constant terms.Constructor Detail |
public AffinePolyVec()
public AffinePolyVec(AffinePolyVec father)
public AffinePolyVec(Transform2 inTransform)
transform2poly(HFE.Transform2)
Method Detail |
public Field2_n coeff(int which)
public Field2_n[] coeffs()
public boolean isEqual(AffinePolyVec whom)
public void setZero()
public void initMem()
public void rnd(java.util.Random rnd)
public void setCoeffs(Field2_n[] inArray)
public void transform2poly(Transform2 inTransform)
inTransform
- affine tranformationpublic void add(AffinePolyVec a, AffinePolyVec b)
public void add(AffinePolyVec whom)
public void sub(AffinePolyVec a, AffinePolyVec b)
public void sub(AffinePolyVec 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 applyLinear(Field2_n res, Field2_n value)
res
- value of the current polynimial vector.value
- array with varNum entries as Field2_n
elementpublic AffinePolyVec sqr()
public void mul(AffinePolyVec res, Field2_n fac)
public void writeString()
public static void testIt()
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 |