The definition of fft is -
pair [][] fft(pair [][] a)
Two questions -
1. Is pair used because the output will be complex so you must the define the input for a real function as (f(x),0.0)?
2. Why isn't the input just pair [] a instead of pair [][] a?
I could not find a detailed description of the fft input and output anywhere in the documentation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For simplicity (and since efficiency isn't the primary concern in a high level language like Asymptote) we only give you access to the basic complex-to-complex FFT routines (but of course real inputs are a special case of complex inputs):
pair[] fft(pair[] a, int sign=1) is one dimensional
pair[][] fft(pair[][] a, int sign=1) is two dimensional
pair[][][] fft(pair[][][] a, int sign=1) is three dimensional
Last edit: John Bowman 2022-02-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The definition of fft is -
pair [][] fft(pair [][] a)
Two questions -
1. Is pair used because the output will be complex so you must the define the input for a real function as (f(x),0.0)?
2. Why isn't the input just pair [] a instead of pair [][] a?
I could not find a detailed description of the fft input and output anywhere in the documentation.
For simplicity (and since efficiency isn't the primary concern in a high level language like Asymptote) we only give you access to the basic complex-to-complex FFT routines (but of course real inputs are a special case of complex inputs):
Last edit: John Bowman 2022-02-09