Class AbstractNTTBuilder

java.lang.Object
org.apfloat.internal.AbstractNTTBuilder
All Implemented Interfaces:
NTTBuilder
Direct Known Subclasses:
DoubleNTTBuilder, FloatNTTBuilder, IntNTTBuilder, LongNTTBuilder

public abstract class AbstractNTTBuilder extends Object implements NTTBuilder
Abstract base class for creating Number Theoretic Transforms suitable for the specified length, based on available memory configured in the ApfloatContext.
Since:
1.7.0
Version:
1.8.3
Author:
Mikko Tommila
  • Constructor Details

    • AbstractNTTBuilder

      protected AbstractNTTBuilder()
      Subclass constructor.
  • Method Details

    • createNTT

      public NTTStrategy createNTT(long size)
      Description copied from interface: NTTBuilder
      Creates a Number Theoretic Transform of suitable type for the specified length.
      Specified by:
      createNTT in interface NTTBuilder
      Parameters:
      size - The transform length that will be used.
      Returns:
      A suitable NTT object for performing the transform.
    • createSimpleFNTStrategy

      protected abstract NTTStrategy createSimpleFNTStrategy(long size)
      Create a simple NTT strategy.
      Parameters:
      size - The transform length that will be used.
      Returns:
      A new simple NTT strategy.
    • createSixStepFNTStrategy

      protected NTTStrategy createSixStepFNTStrategy(long size)
      Create a six-step NTT strategy.
      Parameters:
      size - The transform length that will be used.
      Returns:
      A new six-step NTT strategy.
    • createTwoPassFNTStrategy

      protected NTTStrategy createTwoPassFNTStrategy(long size)
      Create a two-pass NTT strategy.
      Parameters:
      size - The transform length that will be used.
      Returns:
      A new two-pass NTT strategy.
    • createFactor3NTTStrategy

      protected NTTStrategy createFactor3NTTStrategy(long size, NTTStrategy nttStrategy)
      Create a factor-3 NTT strategy on top of another NTT strategy.
      Parameters:
      size - The transform length that will be used.
      nttStrategy - The underlying factor-2 NTT strategy.
      Returns:
      A new factor-3 NTT strategy.