00001
00002
00003 #ifndef _NR_COMPLEX_H_
00004 #define _NR_COMPLEX_H_
00005
00006 #ifndef _FCOMPLEX_DECLARE_T_
00007 typedef struct FCOMPLEX {float r,i;} fcomplex;
00008 #define _FCOMPLEX_DECLARE_T_
00009 #endif
00010
00011 #if defined(__STDC__) || defined(ANSI) || defined(NRANSI)
00012
00013 fcomplex Cadd(fcomplex a, fcomplex b);
00014 fcomplex Csub(fcomplex a, fcomplex b);
00015 fcomplex Cmul(fcomplex a, fcomplex b);
00016 fcomplex Complex(float re, float im);
00017 fcomplex Conjg(fcomplex z);
00018 fcomplex Cdiv(fcomplex a, fcomplex b);
00019 float Cabs(fcomplex z);
00020 fcomplex Csqrt(fcomplex z);
00021 fcomplex RCmul(float x, fcomplex a);
00022
00023 #else
00024
00025
00026 fcomplex Cadd();
00027 fcomplex Csub();
00028 fcomplex Cmul();
00029 fcomplex Complex();
00030 fcomplex Conjg();
00031 fcomplex Cdiv();
00032 float Cabs();
00033 fcomplex Csqrt();
00034 fcomplex RCmul();
00035
00036 #endif
00037
00038 #endif