Class LongAparapiFactor3NTTStrategy

  • All Implemented Interfaces:
    Parallelizable, NTTStrategy

    public class LongAparapiFactor3NTTStrategy
    extends Factor3NTTStrategy
    Factor-3 NTT implementation for the long element type.

    Since:
    1.8.3
    Version:
    1.9.0
    Author:
    Mikko Tommila
    • Constructor Detail

      • LongAparapiFactor3NTTStrategy

        public LongAparapiFactor3NTTStrategy()
        Default constructor.
    • Method Detail

      • transform

        public void transform​(DataStorage dataStorage,
                              int modulus)
                       throws ApfloatRuntimeException
        Description copied from interface: NTTStrategy
        Perform a forward transform on the data.

        Multiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.

        Specified by:
        transform in interface NTTStrategy
        Overrides:
        transform in class Factor3NTTStrategy
        Parameters:
        dataStorage - The data to be transformed.
        modulus - Number of modulus to use (in case the transform supports multiple moduli).
        Throws:
        ApfloatRuntimeException
      • inverseTransform

        public void inverseTransform​(DataStorage dataStorage,
                                     int modulus,
                                     long totalTransformLength)
                              throws ApfloatRuntimeException
        Description copied from interface: NTTStrategy
        Perform an inverse transform on the data.

        Multiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.

        Specified by:
        inverseTransform in interface NTTStrategy
        Overrides:
        inverseTransform in class Factor3NTTStrategy
        Parameters:
        dataStorage - The data to be transformed.
        modulus - Number of modulus to use (in case the transform supports multiple moduli).
        totalTransformLength - Total transform length; the final result elements are divided by this value.
        Throws:
        ApfloatRuntimeException