| 1 | /* complex/gsl_complex.h |
| 2 | * |
| 3 | * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 18 | */ |
| 19 | |
| 20 | #ifndef __GSL_COMPLEX_H__ |
| 21 | #define __GSL_COMPLEX_H__cxx . . $ `external/gsl/gsl_complex.h:21:9`! |
| 22 | |
| 23 | #undef __BEGIN_DECLScxx . . $ `external/gsl/gsl_math.h:104:10`! |
| 24 | #undef __END_DECLScxx . . $ `external/gsl/gsl_math.h:105:10`! |
| 25 | #ifdef __cplusplus |
| 26 | # define __BEGIN_DECLS extern "C" { |
| 27 | # define __END_DECLS } |
| 28 | #else |
| 29 | # define __BEGIN_DECLScxx . . $ `external/gsl/gsl_complex.h:29:10`! /* empty */ |
| 30 | # define __END_DECLScxx . . $ `external/gsl/gsl_complex.h:30:10`! /* empty */ |
| 31 | #endif |
| 32 | |
| 33 | __BEGIN_DECLScxx . . $ `external/gsl/gsl_complex.h:29:10`! |
| 34 | |
| 35 | |
| 36 | /* two consecutive built-in types as a complex number */ |
| 37 | typedef double * gsl_complex_packedcxx . . $ gsl_complex_packed# ; |
| 38 | typedef float * gsl_complex_packed_floatcxx . . $ gsl_complex_packed_float# ; |
| 39 | typedef long double * gsl_complex_packed_long_doublecxx . . $ gsl_complex_packed_long_double# ; |
| 40 | |
| 41 | typedef const double * gsl_const_complex_packedcxx . . $ gsl_const_complex_packed# ; |
| 42 | typedef const float * gsl_const_complex_packed_floatcxx . . $ gsl_const_complex_packed_float# ; |
| 43 | typedef const long double * gsl_const_complex_packed_long_doublecxx . . $ gsl_const_complex_packed_long_double# ; |
| 44 | |
| 45 | |
| 46 | /* 2N consecutive built-in types as N complex numbers */ |
| 47 | typedef double * gsl_complex_packed_arraycxx . . $ gsl_complex_packed_array# ; |
| 48 | typedef float * gsl_complex_packed_array_floatcxx . . $ gsl_complex_packed_array_float# ; |
| 49 | typedef long double * gsl_complex_packed_array_long_doublecxx . . $ gsl_complex_packed_array_long_double# ; |
| 50 | |
| 51 | typedef const double * gsl_const_complex_packed_arraycxx . . $ gsl_const_complex_packed_array# ; |
| 52 | typedef const float * gsl_const_complex_packed_array_floatcxx . . $ gsl_const_complex_packed_array_float# ; |
| 53 | typedef const long double * gsl_const_complex_packed_array_long_doublecxx . . $ gsl_const_complex_packed_array_long_double# ; |
| 54 | |
| 55 | |
| 56 | /* Yes... this seems weird. Trust us. The point is just that |
| 57 | sometimes you want to make it obvious that something is |
| 58 | an output value. The fact that it lacks a 'const' may not |
| 59 | be enough of a clue for people in some contexts. |
| 60 | */ |
| 61 | typedef double * gsl_complex_packed_ptrcxx . . $ gsl_complex_packed_ptr# ; |
| 62 | typedef float * gsl_complex_packed_float_ptrcxx . . $ gsl_complex_packed_float_ptr# ; |
| 63 | typedef long double * gsl_complex_packed_long_double_ptrcxx . . $ gsl_complex_packed_long_double_ptr# ; |
| 64 | |
| 65 | typedef const double * gsl_const_complex_packed_ptrcxx . . $ gsl_const_complex_packed_ptr# ; |
| 66 | typedef const float * gsl_const_complex_packed_float_ptrcxx . . $ gsl_const_complex_packed_float_ptr# ; |
| 67 | typedef const long double * gsl_const_complex_packed_long_double_ptrcxx . . $ gsl_const_complex_packed_long_double_ptr# ; |
| 68 | |
| 69 | |
| 70 | typedef structcxx . . $ $anonymous_type_5ac1bb6e7a03a156_0# |
| 71 | { |
| 72 | long double datcxx . . $ $anonymous_type_5ac1bb6e7a03a156_0#dat.[2]; |
| 73 | } |
| 74 | gsl_complex_long_doublecxx . . $ gsl_complex_long_double#; |
| 75 | |
| 76 | typedef structcxx . . $ $anonymous_type_5ac1bb6e7a03a156_1# |
| 77 | { |
| 78 | double datcxx . . $ $anonymous_type_5ac1bb6e7a03a156_1#dat.[2]; |
| 79 | } |
| 80 | gsl_complexcxx . . $ gsl_complex#; |
| 81 | |
| 82 | typedef structcxx . . $ $anonymous_type_5ac1bb6e7a03a156_2# |
| 83 | { |
| 84 | float datcxx . . $ $anonymous_type_5ac1bb6e7a03a156_2#dat.[2]; |
| 85 | } |
| 86 | gsl_complex_floatcxx . . $ gsl_complex_float#; |
| 87 | |
| 88 | #define GSL_REALcxx . . $ `external/gsl/gsl_complex.h:88:9`!(z) ((z).dat[0]) |
| 89 | #define GSL_IMAGcxx . . $ `external/gsl/gsl_complex.h:89:9`!(z) ((z).dat[1]) |
| 90 | #define GSL_COMPLEX_Pcxx . . $ `external/gsl/gsl_complex.h:90:9`!(zp) ((zp)->dat) |
| 91 | #define GSL_COMPLEX_P_REALcxx . . $ `external/gsl/gsl_complex.h:91:9`!(zp) ((zp)->dat[0]) |
| 92 | #define GSL_COMPLEX_P_IMAGcxx . . $ `external/gsl/gsl_complex.h:92:9`!(zp) ((zp)->dat[1]) |
| 93 | #define GSL_COMPLEX_EQcxx . . $ `external/gsl/gsl_complex.h:93:9`!(z1,z2) (((z1).dat[0] == (z2).dat[0]) && ((z1).dat[1] == (z2).dat[1])) |
| 94 | |
| 95 | #define GSL_SET_COMPLEXcxx . . $ `external/gsl/gsl_complex.h:95:9`!(zp,x,y) do {(zp)->dat[0]=(x); (zp)->dat[1]=(y);} while(0) |
| 96 | #define GSL_SET_REALcxx . . $ `external/gsl/gsl_complex.h:96:9`!(zp,x) do {(zp)->dat[0]=(x);} while(0) |
| 97 | #define GSL_SET_IMAGcxx . . $ `external/gsl/gsl_complex.h:97:9`!(zp,y) do {(zp)->dat[1]=(y);} while(0) |
| 98 | |
| 99 | #define GSL_SET_COMPLEX_PACKEDcxx . . $ `external/gsl/gsl_complex.h:99:9`!(zp,n,x,y) do {*((zp)+2*(n))=(x); *((zp)+(2*(n)+1))=(y);} while(0) |
| 100 | |
| 101 | __END_DECLScxx . . $ `external/gsl/gsl_complex.h:30:10`! |
| 102 | |
| 103 | #endif /* __GSL_COMPLEX_H__ */ |