1 private static Complex[] FFT1(Complex[] f) 2 { 3 int N=f.length; 4 int power= (int) (Math.log10(N)/Math.log10(2)); 5 Complex[] F=new Complex[N]; 6 //按奇偶分组 7 for(int i=0;i<< (power - j - 1); 13 14 F[p] = f[i];15 }16 //蝶形因子17 Complex[] wc = new Complex[N/ 2];18 for (int i = 0; i < N / 2; i++)19 {20 double angle = -i * Math.PI * 2 / N;21 wc[i]=new Complex(Math.cos(angle),Math.sin(angle));22 }23 //蝶形运算24 for(int L=1;L<=power;L++)//第L层数25 {26 int bf=1<<(power-L);//蝶形数27 for(int n=0;n