public interface CarryCRTStrategy
Modifier and Type | Method and Description |
---|---|
DataStorage |
carryCRT(DataStorage resultMod0,
DataStorage resultMod1,
DataStorage resultMod2,
long resultSize)
Calculate the final result of a three-NTT convolution.
|
DataStorage carryCRT(DataStorage resultMod0, DataStorage resultMod1, DataStorage resultMod2, long resultSize) throws ApfloatRuntimeException
Performs a Chinese Remainder Theorem (CRT) on each element of the three result data sets to get the result of each element modulo the product of the three moduli. Then it calculates the carries to get the final result.
Note that the return value's initial word may be zero or non-zero, depending on how large the result is.
Assumes that MODULUS[0] > MODULUS[1] > MODULUS[2]
.
resultMod0
- The result modulo MODULUS[0]
.resultMod1
- The result modulo MODULUS[1]
.resultMod2
- The result modulo MODULUS[2]
.resultSize
- The number of elements needed in the final result.ApfloatRuntimeException
Copyright © 2018. All rights reserved.