public class ProductFormPolynomial extends java.lang.Object implements Polynomial
f1*f2+f3, where
f1,f2,f3 are very sparsely populated ternary polynomials.| Constructor and Description |
|---|
ProductFormPolynomial(SparseTernaryPolynomial f1,
SparseTernaryPolynomial f2,
SparseTernaryPolynomial f3) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static ProductFormPolynomial |
fromBinary(byte[] data,
int N,
int df1,
int df2,
int df3Ones,
int df3NegOnes) |
static ProductFormPolynomial |
fromBinary(java.io.InputStream is,
int N,
int df1,
int df2,
int df3Ones,
int df3NegOnes) |
static ProductFormPolynomial |
generateRandom(int N,
int df1,
int df2,
int df3Ones,
int df3NegOnes,
java.security.SecureRandom random) |
int |
hashCode() |
BigIntPolynomial |
mult(BigIntPolynomial b)
Multiplies the polynomial by a
BigIntPolynomial, taking the indices mod N. |
IntegerPolynomial |
mult(IntegerPolynomial b)
Multiplies the polynomial by an
IntegerPolynomial,
taking the indices mod N. |
IntegerPolynomial |
mult(IntegerPolynomial poly2,
int modulus)
Multiplies the polynomial by an
IntegerPolynomial,
taking the coefficient values mod modulus and the indices mod N. |
byte[] |
toBinary() |
IntegerPolynomial |
toIntegerPolynomial()
Returns a polynomial that is equal to this polynomial (in the sense that
Polynomial.mult(IntegerPolynomial, int)
returns equal IntegerPolynomials). |
public ProductFormPolynomial(SparseTernaryPolynomial f1, SparseTernaryPolynomial f2, SparseTernaryPolynomial f3)
public static ProductFormPolynomial generateRandom(int N, int df1, int df2, int df3Ones, int df3NegOnes, java.security.SecureRandom random)
public static ProductFormPolynomial fromBinary(byte[] data, int N, int df1, int df2, int df3Ones, int df3NegOnes) throws java.io.IOException
java.io.IOExceptionpublic static ProductFormPolynomial fromBinary(java.io.InputStream is, int N, int df1, int df2, int df3Ones, int df3NegOnes) throws java.io.IOException
java.io.IOExceptionpublic byte[] toBinary()
public IntegerPolynomial mult(IntegerPolynomial b)
PolynomialIntegerPolynomial,
taking the indices mod N.mult in interface Polynomialb - a polynomialpublic BigIntPolynomial mult(BigIntPolynomial b)
PolynomialBigIntPolynomial, taking the indices mod N. Does not
change this polynomial but returns the result as a new polynomial.mult in interface Polynomialb - the polynomial to multiply bypublic IntegerPolynomial toIntegerPolynomial()
PolynomialPolynomial.mult(IntegerPolynomial, int)
returns equal IntegerPolynomials). The new polynomial is guaranteed to be independent of the original.toIntegerPolynomial in interface PolynomialIntegerPolynomial.public IntegerPolynomial mult(IntegerPolynomial poly2, int modulus)
PolynomialIntegerPolynomial,
taking the coefficient values mod modulus and the indices mod N.mult in interface Polynomialpoly2 - a polynomialmodulus - a modulus to applypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object