|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.flexiprovider.common.math.polynomials.SparseBinaryConvolutionPolynomial
This class represents sparse binary polynomials in the ring Z(X)/(X^N-1). The polynomials are stored as int arrays of the degrees of the monomials with coefficient 1.
| Field Summary | |
(package private) int[] |
degrees
The array of the degrees of the monomials with coefficient 1 |
(package private) int |
N
The degree of the reduction polynomial |
| Constructor Summary | |
SparseBinaryConvolutionPolynomial(BinaryConvolutionPolynomial binPol)
Construct a SparseBinaryConvolutionPolynomial out of the given BinaryConvolutionPolynomial. |
|
SparseBinaryConvolutionPolynomial(int N,
int[] degrees)
Create a sparse binary polynomial out of the given degree array |
|
SparseBinaryConvolutionPolynomial(int N,
int d,
SecureRandom sr)
Create a sparse binary polynomial of degree less than N. |
|
SparseBinaryConvolutionPolynomial(SparseBinaryConvolutionPolynomial other)
Copy constructor. |
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
Compare this 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[][] |
getPatterns()
Compute an array of bit pattern locations (minimal size). |
int |
hashCode()
|
static SparseBinaryConvolutionPolynomial |
OS2REP(int N,
int d,
byte[] encoded)
Create a sparse binary polynomial out of the given byte array. |
byte[] |
RE2OSP()
Encode this polynomial as a byte array. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
int N
int[] degrees
| Constructor Detail |
public SparseBinaryConvolutionPolynomial(int N,
int[] degrees)
N - the degree of the reduction polynomialdegrees - the array of the degrees of the monomials with coefficient
1
public SparseBinaryConvolutionPolynomial(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 SparseBinaryConvolutionPolynomial(BinaryConvolutionPolynomial binPol)
binPol - the BinaryPolynomialpublic SparseBinaryConvolutionPolynomial(SparseBinaryConvolutionPolynomial other)
other - another SparseBinaryPolynomial| Method Detail |
int[][] getPatternLocations(int w)
w - the window sizepublic int[][] getPatterns()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the other objectpublic int hashCode()
hashCode in class java.lang.Objectpublic byte[] RE2OSP()
public static SparseBinaryConvolutionPolynomial OS2REP(int N,
int d,
byte[] encoded)
throws java.lang.IllegalArgumentException
N - the degree of the reduction polynomiald - the number of non-zero coefficientsencoded - an encoded sparse binary polynomialjava.lang.IllegalArgumentException - if the encoded polynomial has wrong length.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||