Menu

Usage of fft

Help
2022-02-09
2022-02-09
  • Alan Bromborsky

    Alan Bromborsky - 2022-02-09

    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.

     
  • John Bowman

    John Bowman - 2022-02-09

    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

Log in to post a comment.