Interface NTTConvolutionStepStrategy

All Known Implementing Classes:
DoubleNTTConvolutionStepStrategy, FloatNTTConvolutionStepStrategy, IntNTTConvolutionStepStrategy, LongNTTConvolutionStepStrategy

public interface NTTConvolutionStepStrategy
Steps for a three-NTT convolution. This includes element-by-element multiplication and squaring of the transformed data.
Since:
1.7.0
Version:
1.7.0
Author:
Mikko Tommila
  • 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 Details

    • 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