Class DecorableFactor3NTTStrategy
java.lang.Object
org.apfloat.internal.Factor3NTTStrategy
org.apfloat.aparapi.DecorableFactor3NTTStrategy
- All Implemented Interfaces:
DecorableNTTStrategy, Parallelizable, NTTStrategy
- Direct Known Subclasses:
IntAparapiFactor3NTTStrategy, LongAparapiFactor3NTTStrategy
Factor-3 NTT strategy that can be decorated.
- Since:
- 1.15.0
- Version:
- 1.15.0
- Author:
- Mikko Tommila
-
Field Summary
Fields inherited from class Factor3NTTStrategy
stepStrategy -
Constructor Summary
ConstructorsConstructorDescriptionDecorableFactor3NTTStrategy(NTTStrategy factor2Strategy) Creates a new factor-3 transform strategy on top of an existing transform.DecorableFactor3NTTStrategy(NTTStrategy factor2Strategy, Factor3NTTStepStrategy stepStrategy) Creates a new factor-3 transform strategy on top of an existing factor-2 transform and a factor-3 step strategy. -
Method Summary
Modifier and TypeMethodDescriptionvoidinverseTransform(DataStorage dataStorage, int modulus, long totalTransformLength) Perform an inverse transform on the data.voidtransform(DataStorage dataStorage, int modulus) Perform a forward transform on the data.Methods inherited from class Factor3NTTStrategy
getTransformLengthMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DecorableNTTStrategy
postTransform, preTransform
-
Constructor Details
-
DecorableFactor3NTTStrategy
Creates a new factor-3 transform strategy on top of an existing transform. The underlying transform needs to be capable of only doing transforms of length 2n.- Parameters:
factor2Strategy- The underlying transformation strategy, that can be capable of only doing radix-2 transforms.
-
DecorableFactor3NTTStrategy
public DecorableFactor3NTTStrategy(NTTStrategy factor2Strategy, Factor3NTTStepStrategy stepStrategy) Creates a new factor-3 transform strategy on top of an existing factor-2 transform and a factor-3 step strategy.- Parameters:
factor2Strategy- The underlying transformation strategy, that can be capable of only doing radix-2 transforms.stepStrategy- The factor-3 step strategy.
-
-
Method Details
-
transform
Description copied from interface:NTTStrategyPerform 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:
transformin interfaceNTTStrategy- Overrides:
transformin classFactor3NTTStrategy- 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:NTTStrategyPerform 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:
inverseTransformin interfaceNTTStrategy- Overrides:
inverseTransformin classFactor3NTTStrategy- 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
-