Interface NTTConvolutionStepStrategy

    • Method Summary

      Modifier and Type Method Description
      void multiplyInPlace​(DataStorage sourceAndDestination, DataStorage source, int modulus)
      Linear multiplication in the number theoretic domain.
      void squareInPlace​(DataStorage sourceAndDestination, int modulus)
      Linear squaring in the number theoretic domain.
    • Method Detail

      • multiplyInPlace

        void multiplyInPlace​(DataStorage sourceAndDestination,
                             DataStorage source,
                             int modulus)
                      throws ApfloatRuntimeException
        Linear multiplication in the number theoretic domain. The operation is sourceAndDestination[i] *= source[i] (mod m).

        For maximum performance, sourceAndDestination should be in memory if possible.

        Parameters:
        sourceAndDestination - The first source data storage, which is also the destination.
        source - The second source data storage.
        modulus - Which modulus to use (0, 1, 2)
        Throws:
        ApfloatRuntimeException
      • squareInPlace

        void squareInPlace​(DataStorage sourceAndDestination,
                           int modulus)
                    throws ApfloatRuntimeException
        Linear squaring in the number theoretic domain. The operation is sourceAndDestination[i] *= sourceAndDestination[i] (mod m).

        For maximum performance, sourceAndDestination should be in memory if possible.

        Parameters:
        sourceAndDestination - The source data storage, which is also the destination.
        modulus - Which modulus to use (0, 1, 2)
        Throws:
        ApfloatRuntimeException