public class LongPolynomial5
extends java.lang.Object
long
value for
faster multiplication by a ternary polynomial.long
number.Modifier and Type | Field and Description |
---|---|
private long[] |
coeffs |
private int |
numCoeffs |
Modifier | Constructor and Description |
---|---|
|
LongPolynomial5(IntegerPolynomial p)
Constructs a
LongPolynomial5 from a IntegerPolynomial . |
private |
LongPolynomial5(long[] coeffs,
int numCoeffs) |
Modifier and Type | Method and Description |
---|---|
LongPolynomial5 |
mult(TernaryPolynomial poly2)
Multiplies the polynomial with a
TernaryPolynomial , taking the indices mod N and the values mod 2048. |
IntegerPolynomial |
toIntegerPolynomial() |
public LongPolynomial5(IntegerPolynomial p)
LongPolynomial5
from a IntegerPolynomial
. The two polynomials are independent of each other.p
- the original polynomial. Coefficients must be between 0 and 2047.private LongPolynomial5(long[] coeffs, int numCoeffs)
public LongPolynomial5 mult(TernaryPolynomial poly2)
TernaryPolynomial
, taking the indices mod N and the values mod 2048.public IntegerPolynomial toIntegerPolynomial()