fft

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SCALING_DEFAULT = iota
	SCALING_ORTHONORMAL
	MODE_STANDARD
	MODE_INPLACE
)

* Global constants.

View Source
const (
	MATH_INV_SQRT_2   = 1.0 / math.Sqrt2
	MATH_MINUS_TWO_PI = -2.0 * math.Pi
)

* Mathematical constants

Variables

This section is empty.

Functions

func NextPowerOfTwo

func NextPowerOfTwo(value uint64) (uint64, uint32)

* Find the next higher power of two. * * If value is already a power of two, the same value is returned.

func Shift

func Shift(vec []complex128, inverse bool)

* Shift negative frequencies to lower indices than the DC component or invert the * shifting process.

func ZeroComplex

func ZeroComplex(buffer []complex128)

* Write zeroes to a complex-valued buffer.

func ZeroFloat

func ZeroFloat(buffer []float64)

* Write zeroes to a floating-point buffer.

Types

type FourierTransform added in v1.5.1

type FourierTransform interface {
	Fourier(vec []complex128, scaling int, mode int) []complex128
	InverseFourier(vec []complex128, scaling int, mode int) []complex128
	RealFourier(in []float64, out []complex128, scaling int) error
	RealInverseFourier(in []complex128, out []float64, scaling int) error
}

* A Fourier transform. * * A single transform is not safe for concurrent use!

func CreateFourierTransform added in v1.5.1

func CreateFourierTransform() FourierTransform

* Creates a Fourier transform.

Jump to

Keyboard shortcuts

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