📄 myfft.h
字号:
/**###**************************************************************###**/
//注 意:此软件允许无偿使用、拷贝、修改、分发,并可用于任何用途,仅当您同意如下条款:
// 在使用此软件的任何文挡中包含下面的所有声明,以及本注意事项!
//Caution :Permission to use, copy, modify, and distribute this software
// in code form for any purpose and without fee is hereby granted,
// provided that the above notice ,below declare and this limited warranty
// appears in all copies and all supporting documentation.
//作 者:王寅庆 E_mail:merrydw@163.com
//指导教师:李祥教授
//部 门:贵州大学计算机软件和理论研究所 贵州大学
//地 址:贵州省 贵阳市花溪 (550025)
//时 间:2003-1-20 19:52:15
//注 释:
/**###**************************************************************###**/
/////////////////////////////////////////////////////
//#include "myfft.h"
//一维和二维快速傅立叶变换
#ifndef _GUIZHOUDAXUE_WYQFFT_H_
#define _GUIZHOUDAXUE_WYQFFT_H_
#pragma pack(push,2)
struct Complex {double re,im;};
////////////////////////////////////
/*基于2的幂次的一维FFT
输入:
struct Complex ft[]: input complex array
m: power(2,m) equal the array length of ft[]
f: flag,it's value is 'd' and 'i','d' means the discret fft and 'i' means the reverse fft
example:
the complex array is a[64],so we can call it as: fft2(a,6,'d') for discrete fft or fft2(a,6,'i') for reverse fft
*/
void fft2(struct Complex ft[],int m,int inv);
/*基于2的幂次的二维FFT
输入:
struct Complex ft[]: input complex array
m: power(2,m) equal the array row length of ft[]
n: power(2,n) equal the array column length of ft[]
f: flag,it's value is 'd' and 'i','d' means the discret fft and 'i' means the reverse fft
example:
the complex array is a[64]with the column length 8 and row length 8,so we can call as it: fft_2d(a,3,3,'d') for discrete fft or fft_2d(a,3,3,'i') for reverse fft
*/
void fft2_2d(struct Complex a[],int m,int n,int f);/*基于2的幂次的二维FFT*/
#pragma pack(pop)
#endif //!end of _GUIZHOUDAXUE_WYQFFT_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -