Interface Polynomial

    • Method Detail

      • mult

        IntegerPolynomial mult​(IntegerPolynomial poly2)
        Multiplies the polynomial by an IntegerPolynomial, taking the indices mod N.
        Parameters:
        poly2 - a polynomial
        Returns:
        the product of the two polynomials
      • mult

        IntegerPolynomial mult​(IntegerPolynomial poly2,
                               int modulus)
        Multiplies the polynomial by an IntegerPolynomial, taking the coefficient values mod modulus and the indices mod N.
        Parameters:
        poly2 - a polynomial
        modulus - 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 that mult(IntegerPolynomial, int) returns equal IntegerPolynomials). The new polynomial is guaranteed to be independent of the original.
        Returns:
        a new IntegerPolynomial.
      • mult

        BigIntPolynomial mult​(BigIntPolynomial poly2)
        Multiplies the polynomial by a BigIntPolynomial, 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