Package org.apfloat.spi
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 TypeMethodDescriptionvoidmultiplyInPlace(DataStorage sourceAndDestination, DataStorage source, int modulus) Linear multiplication in the number theoretic domain.voidsquareInPlace(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 issourceAndDestination[i] *= source[i] (mod m).For maximum performance,
sourceAndDestinationshould 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
Linear squaring in the number theoretic domain. The operation issourceAndDestination[i] *= sourceAndDestination[i] (mod m).For maximum performance,
sourceAndDestinationshould 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
-