fft

package
v0.0.0-...-0876c8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const FFTratio uint8 = 1

Variables

This section is empty.

Functions

func Add

func Add(f, g []float64) []float64

Addition of two polynomials (coefficient representation).

func AddFFT

func AddFFT(f_fft, g_fft []complex128) []complex128

Addition of two polynomials (FFT representation).

func Adj

func Adj(f []float64) []float64

Division of two polynomials (coefficient representation).

func AdjFFT

func AdjFFT(f_fft []complex128) []complex128

Multiplication of two polynomials (coefficient representation).

func Div

func Div(f, g []float64) []float64

Division of two polynomials (coefficient representation).

func DivFFT

func DivFFT(f_fft, g_fft []complex128) []complex128

Division of two polynomials (FFT representation).

func FFT

func FFT(f []float64) []complex128

Compute the FFT of a polynomial mod (x ** n + 1). f: a polynomial Format: input as coefficients, output as FFT

func IFFT

func IFFT(f_fft []complex128) []float64

Compute the inverse FFT of a polynomial mod (x ** n + 1). f: a FFT of a polynomial Format: input as FFT, output as coefficients

func MergeFFT

func MergeFFT(fl [][]complex128) []complex128

Merge two or three polynomials into a single polynomial f. f_list: a list of polynomials format: FFT Corresponds to algorithm 2 (mergefft_2) of Falcon's documentation.

func Mul

func Mul(f, g []float64) []float64

Multiplication of two polynomials (coefficient representation).

func MulFFT

func MulFFT(f_fft, g_fft []complex128) []complex128

Multiplication of two polynomials (coefficient representation).

func Neg

func Neg(f []float64) []float64

Negation of a polynomials (any representation).

func NegFFT

func NegFFT(f []complex128) []complex128

func RoundFFTtoInt16

func RoundFFTtoInt16(FFT []complex128) []int16

func SplitFFT

func SplitFFT(f_fft []complex128) [][]complex128

SplitFft - Split a polynomial f in two polynomials f_fft: a polynomial format: FFT Corresponds to algorithm 1 (splitfft_2) of Falcon's documentation.

func Sub

func Sub(f, g []float64) []float64

Substraction of two polynomials (any representation).

func SubFFT

func SubFFT(f_fft, g_fft []complex128) []complex128

Substraction of two polynomials (FFT representation).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL