Interface Polynomial
-
- All Known Subinterfaces:
TernaryPolynomial
- All Known Implementing Classes:
DenseTernaryPolynomial,IntegerPolynomial,ProductFormPolynomial,SparseTernaryPolynomial
public interface Polynomial
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BigIntPolynomialmult(BigIntPolynomial poly2)Multiplies the polynomial by aBigIntPolynomial, taking the indices mod N.IntegerPolynomialmult(IntegerPolynomial poly2)Multiplies the polynomial by anIntegerPolynomial, taking the indices modN.IntegerPolynomialmult(IntegerPolynomial poly2, int modulus)Multiplies the polynomial by anIntegerPolynomial, taking the coefficient values modmodulusand the indices modN.IntegerPolynomialtoIntegerPolynomial()Returns a polynomial that is equal to this polynomial (in the sense thatmult(IntegerPolynomial, int)returns equalIntegerPolynomials).
-
-
-
Method Detail
-
mult
IntegerPolynomial mult(IntegerPolynomial poly2)
Multiplies the polynomial by anIntegerPolynomial, taking the indices modN.- Parameters:
poly2- a polynomial- Returns:
- the product of the two polynomials
-
mult
IntegerPolynomial mult(IntegerPolynomial poly2, int modulus)
Multiplies the polynomial by anIntegerPolynomial, taking the coefficient values modmodulusand the indices modN.- Parameters:
poly2- a polynomialmodulus- a modulus to apply- Returns:
- the product of the two polynomials
-
toIntegerPolynomial
IntegerPolynomial toIntegerPolynomial()
Returns a polynomial that is equal to this polynomial (in the sense thatmult(IntegerPolynomial, int)returns equalIntegerPolynomials). The new polynomial is guaranteed to be independent of the original.- Returns:
- a new
IntegerPolynomial.
-
mult
BigIntPolynomial mult(BigIntPolynomial poly2)
Multiplies the polynomial by aBigIntPolynomial, taking the indices mod N. Does not change this polynomial but returns the result as a new polynomial.
Both polynomials must have the same number of coefficients.- Parameters:
poly2- the polynomial to multiply by- Returns:
- a new polynomial
-
-