Class AbstractConvolutionBuilder

java.lang.Object
org.apfloat.internal.AbstractConvolutionBuilder
All Implemented Interfaces:
ConvolutionBuilder
Direct Known Subclasses:
DoubleConvolutionBuilder, FloatConvolutionBuilder, IntConvolutionBuilder, LongConvolutionBuilder

public abstract class AbstractConvolutionBuilder extends Object implements ConvolutionBuilder
Abstract base class for creating convolutions of suitable type for the specified length.

Based on a work estimate, depending on the operand sizes and implementation-dependent factors, the O(n2) long multiplication, Karatsuba multiplication and the NTT algorithms are chosen e.g. as follows:

Convolution algorithms
size1size2Algorithm
1616Long
16256Long
3232Long
32256Long
6464Karatsuba
64256NTT
6465536Karatsuba
128128NTT
12865536NTT
1284294967296Karatsuba
256256NTT
2564294967296Karatsuba
512512NTT
5124294967296NTT
Since:
1.7.0
Version:
1.7.0
Author:
Mikko Tommila