FalconFFT class

This file contains an implementation of the FFT.

The FFT implemented here is for polynomials in Rx/(phi), with:

  • The polynomial modulus phi = x ** n + 1, with n a power of two, n <= 1024

The code is voluntarily very similar to the code of the NTT. It is probably possible to use templating to merge both implementations.

Constructors

FalconFFT()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

add(List<num> f, List<num> g) List<num>
Addition of two polynomials (coefficient representation).
addFft(List<Complex> fFft, List<Complex> gFft) List<Complex>
Addition of two polynomials (FFT representation).
adj(List<num> f) List<num>
Adjoint of a polynomial (coefficient representation).
adjFft(List<Complex> fFft) List<Complex>
Adjoint of a polynomial (FFT representation).
div(List<num> f, List<num> g) List<num>
Division of two polynomials (coefficient representation).
divFft(List<Complex> fFft, List<Complex> gFft) List<Complex>
Division of two polynomials (FFT representation).
fft(List<num> f) List<Complex>
Compute the FFT of a polynomial mod (x ** n + 1).
ifft(List<Complex> fFft) List<num>
Compute the inverse FFT of a polynomial mod (x ** n + 1).
mergeFft(List<List<Complex>> fListFft) List<Complex>
Merge two polynomials into a single polynomial f.
mul(List<num> f, List<num> g) List<num>
Multiplication of two polynomials (coefficient representation).
mulFft(List<Complex> fFft, List<Complex> gFft) List<Complex>
Multiplication of two polynomials (FFT representation).
neg<T extends num>(List<T> f) List<T>
Negation of a polynomial (any representation).
splitFft(List<Complex> fFft) List<List<Complex>>
Split a polynomial f in two polynomials.
sub(List<num> f, List<num> g) List<num>
Subtraction of two polynomials (any representation).
subFft(List<Complex> fFft, List<Complex> gFft) List<Complex>
Subtraction of two polynomials (FFT representation).

Constants

fftRatio → const int
This value is the ratio between: