Package org.bouncycastle.pqc.math.ntru.polynomial

## 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
    --- | --- | ---
    `BigIntPolynomial` | `mult​(BigIntPolynomial poly2)` | Multiplies the polynomial by a `BigIntPolynomial`, taking the indices mod N.
    `IntegerPolynomial` | `mult​(IntegerPolynomial poly2)` | Multiplies the polynomial by an `IntegerPolynomial`, taking the indices mod `N`.
    `IntegerPolynomial` | `mult​(IntegerPolynomial poly2, int modulus)` | Multiplies the polynomial by an `IntegerPolynomial`, taking the coefficient values mod `modulus` and the indices mod `N`.
    `IntegerPolynomial` | `toIntegerPolynomial()` | Returns a polynomial that is equal to this polynomial (in the sense that `mult(IntegerPolynomial, int)` returns equal `IntegerPolynomial`s).

- - ### 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 `IntegerPolynomial`s). 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