BigInteger coefficients.add) change the polynomial, others (like mult) do
not but return the result as a new polynomial.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv BigInteger[] | |
| private static final double |
| Access | Constructor and Description |
|---|---|
| pack-priv | BigIntPolynomial(int
the number of coefficients N)Constructs a new polynomial with |
| pack-priv | BigIntPolynomial(BigInteger[]
the coefficients coeffs)Constructs a new polynomial with a given set of coefficients. |
| public | BigIntPolynomial(IntegerPolynomial
the original polynomial p)Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | add(BigIntPolynomial
another polynomial b, BigInteger modulus)Adds another polynomial which can have a different number of coefficients,
and takes the coefficient values mod |
| public void | add(BigIntPolynomial
another polynomial b)Adds another polynomial which can have a different number of coefficients. |
| public Object | clone()
Overrides java. Makes a copy of the polynomial that is independent of the original. |
| public void | div(BigInteger
the number to divide by divisor)Divides each coefficient by a |
| public BigDecimalPolynomial | Returns: a newBigDecimalPolynomialthe number to divide by divisor, int the number of fractional digits to round the result to decimalPlaces)Divides each coefficient by a |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| pack-priv static BigIntPolynomial | Returns: a random polynomial.number of coefficients N, int number of 1's numOnes, int number of -1's numNegOnes)Generates a random polynomial with |
| public BigInteger[] | |
| public int | Returns: length of the longest coefficientReturns the base10 length of the largest coefficient. |
| public int | |
| private BigInteger | |
| public void | |
| public BigIntPolynomial | Returns: a new polynomialthe polynomial to multiply by poly2)Multiplies the polynomial by another, taking the indices mod N. |
| public void | |
| pack-priv void | |
| private BigIntPolynomial | |
| public void | sub(BigIntPolynomial
another polynomial b)Subtracts another polynomial which can have a different number of coefficients. |
| pack-priv BigInteger | Returns: the sum of all coefficientsReturns the sum of all coefficients, i.e. evaluates the polynomial at 0. |
| coeffs | back to summary |
|---|---|
| pack-priv BigInteger[] coeffs | |
| LOG_10_2 | back to summary |
|---|---|
| private static final double LOG_10_2 | |
| BigIntPolynomial | back to summary |
|---|---|
| pack-priv BigIntPolynomial(int N) Constructs a new polynomial with
| |
| BigIntPolynomial | back to summary |
|---|---|
| pack-priv BigIntPolynomial(BigInteger[] coeffs) Constructs a new polynomial with a given set of coefficients.
| |
| BigIntPolynomial | back to summary |
|---|---|
| public BigIntPolynomial(IntegerPolynomial p) Constructs a
| |
| add | back to summary |
|---|---|
| pack-priv void add(BigIntPolynomial b, BigInteger modulus) Adds another polynomial which can have a different number of coefficients,
and takes the coefficient values mod
| |
| add | back to summary |
|---|---|
| public void add(BigIntPolynomial b) Adds another polynomial which can have a different number of coefficients.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Makes a copy of the polynomial that is independent of the original.
| |
| div | back to summary |
|---|---|
| public void div(BigInteger divisor) Divides each coefficient by a
| |
| div | back to summary |
|---|---|
| public BigDecimalPolynomial div(BigDecimal divisor, int decimalPlaces) Divides each coefficient by a
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| generateRandomSmall | back to summary |
|---|---|
| pack-priv static BigIntPolynomial generateRandomSmall(int N, int numOnes, int numNegOnes) Generates a random polynomial with
| |
| getCoeffs | back to summary |
|---|---|
| public BigInteger[] getCoeffs() | |
| getMaxCoeffLength | back to summary |
|---|---|
| public int getMaxCoeffLength() Returns the base10 length of the largest coefficient.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| maxCoeffAbs | back to summary |
|---|---|
| private BigInteger maxCoeffAbs() | |
| mod | back to summary |
|---|---|
| public void mod(BigInteger modulus) Takes each coefficient modulo a number. | |
| mult | back to summary |
|---|---|
| public BigIntPolynomial mult(BigIntPolynomial poly2) Multiplies the polynomial by another, taking the indices mod N. Does not
change this polynomial but returns the result as a new polynomial.
| |
| mult | back to summary |
|---|---|
| public void mult(BigInteger factor) Multiplies each coefficient by a | |
| mult | back to summary |
|---|---|
| pack-priv void mult(int factor) Multiplies each coefficient by a | |
| multRecursive | back to summary |
|---|---|
| private BigIntPolynomial multRecursive(BigIntPolynomial poly2) Karazuba multiplication | |
| sub | back to summary |
|---|---|
| public void sub(BigIntPolynomial b) Subtracts another polynomial which can have a different number of coefficients.
| |
| sumCoeffs | back to summary |
|---|---|
| pack-priv BigInteger sumCoeffs() Returns the sum of all coefficients, i.e. evaluates the polynomial at 0.
| |