Interface Polynomial
- All Known Subinterfaces:
TernaryPolynomial
- All Known Implementing Classes:
DenseTernaryPolynomial,IntegerPolynomial,ProductFormPolynomial,SparseTernaryPolynomial
public interface Polynomial
-
Method Summary
Modifier and TypeMethodDescriptionmult(BigIntPolynomial poly2) Multiplies the polynomial by aBigIntPolynomial, taking the indices mod N.mult(IntegerPolynomial poly2) Multiplies the polynomial by anIntegerPolynomial, taking the indices modN.mult(IntegerPolynomial poly2, int modulus) Multiplies the polynomial by anIntegerPolynomial, taking the coefficient values modmodulusand the indices modN.Returns a polynomial that is equal to this polynomial (in the sense thatmult(IntegerPolynomial, int)returns equalIntegerPolynomials).
-
Method Details
-
mult
Multiplies the polynomial by anIntegerPolynomial, taking the indices modN.- Parameters:
poly2- a polynomial- Returns:
- the product of the two polynomials
-
mult
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
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
-