|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.flexiprovider.common.math.polynomials.BinaryConvolutionPolynomial
This class represents binary polynomials in the ring Z(X)/(X^N-1). The coefficients of the polynomials are stored as compressed int arrays (32 coefficients per int).
| Field Summary | |
(package private) int[] |
coefficients
The coefficient array |
(package private) int |
degree
The degree of this polynomial |
(package private) int |
N
The degree of the reduction polynomial |
| Constructor Summary | |
BinaryConvolutionPolynomial(BinaryConvolutionPolynomial other)
Copy constructor. |
|
BinaryConvolutionPolynomial(int N,
int[] coefficients)
Create a binary polynomial out of the given coefficient array |
|
BinaryConvolutionPolynomial(int N,
int d,
SecureRandom sr)
Create a binary polynomial of degree less than N. |
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
Compare this binary polynomial with the given object. |
(package private) int[][] |
getPatternLocations(int w)
Compute an array of bit pattern locations given a windows size according to Algorithm 2 of M.-K. |
int |
hashCode()
|
(package private) int |
numCoeffs()
Compute the number of 1 coefficients of this binary polynomial. |
void |
setCoefficient(int index)
Set the coefficient with the given index. |
boolean |
testCoefficient(int index)
Test whether the coefficient with the given index is 1. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
int N
int degree
int[] coefficients
| Constructor Detail |
public BinaryConvolutionPolynomial(int N,
int[] coefficients)
throws java.lang.IllegalArgumentException
N - the degree of the reduction polynomialcoefficients - the coefficient arrayjava.lang.IllegalArgumentException - if the degree of the given coefficient array is
>= N.
public BinaryConvolutionPolynomial(int N,
int d,
SecureRandom sr)
N - the degree of the reduction polynomiald - the number of non-zero coefficientssr - source of randomness to create the polynomialpublic BinaryConvolutionPolynomial(BinaryConvolutionPolynomial other)
other - another BinaryPolynomial| Method Detail |
public void setCoefficient(int index)
index - the indexpublic boolean testCoefficient(int index)
index - the index of the coefficient to testint[][] getPatternLocations(int w)
w - the window sizepublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the other objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectint numCoeffs()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||