rb-gsl 1.16.0.4 → 1.16.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (307) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +12 -0
  3. data/.travis.yml +24 -0
  4. data/AUTHORS +6 -0
  5. data/COPYING +341 -339
  6. data/ChangeLog +608 -587
  7. data/Gemfile +4 -0
  8. data/README.md +77 -0
  9. data/Rakefile +14 -33
  10. data/THANKS +1 -1
  11. data/examples/blas/blas.rb +1 -1
  12. data/examples/bspline.rb +3 -3
  13. data/examples/complex/functions.rb +4 -4
  14. data/examples/complex/mul.rb +1 -1
  15. data/examples/const/physconst.rb +4 -4
  16. data/examples/const/travel.rb +4 -4
  17. data/examples/eigen/nonsymmv.rb +1 -1
  18. data/examples/eigen/qhoscillator.rb +3 -3
  19. data/examples/fft/radix2.rb +1 -1
  20. data/examples/fft/real-halfcomplex.rb +3 -3
  21. data/examples/fft/real-halfcomplex2.rb +3 -3
  22. data/examples/fit/expfit.rb +1 -1
  23. data/examples/fit/multifit.rb +1 -1
  24. data/examples/fit/ndlinear.rb +44 -44
  25. data/examples/fit/nonlinearfit.rb +1 -1
  26. data/examples/fit/wlinear.rb +3 -3
  27. data/examples/function/function.rb +1 -1
  28. data/examples/function/min.rb +1 -1
  29. data/examples/function/synchrotron.rb +2 -2
  30. data/examples/gallery/koch.rb +1 -1
  31. data/examples/histogram/cauchy.rb +2 -2
  32. data/examples/histogram/exponential.rb +1 -1
  33. data/examples/histogram/histo3d.rb +1 -1
  34. data/examples/histogram/histogram-pdf.rb +2 -2
  35. data/examples/histogram/xexp.rb +1 -1
  36. data/examples/integration/ahmed.rb +2 -2
  37. data/examples/integration/cosmology.rb +7 -7
  38. data/examples/integration/friedmann.rb +4 -4
  39. data/examples/integration/qng.rb +1 -1
  40. data/examples/interp/demo.rb +2 -2
  41. data/examples/linalg/LQ_solve.rb +1 -1
  42. data/examples/linalg/LU.rb +1 -1
  43. data/examples/linalg/LU2.rb +1 -1
  44. data/examples/linalg/LU_narray.rb +1 -1
  45. data/examples/linalg/PTLQ.rb +1 -1
  46. data/examples/linalg/QRPT.rb +1 -1
  47. data/examples/linalg/chol.rb +1 -1
  48. data/examples/linalg/chol_narray.rb +1 -1
  49. data/examples/linalg/complex.rb +1 -1
  50. data/examples/math/elementary.rb +1 -1
  51. data/examples/math/functions.rb +1 -1
  52. data/examples/math/inf_nan.rb +1 -1
  53. data/examples/math/minmax.rb +1 -1
  54. data/examples/math/power.rb +1 -1
  55. data/examples/math/test.rb +1 -1
  56. data/examples/min.rb +1 -1
  57. data/examples/multimin/bundle.rb +1 -1
  58. data/examples/multimin/cqp.rb +17 -17
  59. data/examples/multiroot/fsolver3.rb +1 -1
  60. data/examples/odeiv/binarysystem.rb +12 -12
  61. data/examples/odeiv/demo.rb +3 -3
  62. data/examples/odeiv/frei1.rb +7 -7
  63. data/examples/odeiv/frei2.rb +4 -4
  64. data/examples/odeiv/oscillator.rb +1 -1
  65. data/examples/odeiv/sedov.rb +3 -3
  66. data/examples/odeiv/whitedwarf.rb +11 -11
  67. data/examples/permutation/ex1.rb +2 -2
  68. data/examples/permutation/permutation.rb +1 -1
  69. data/examples/poly/demo.rb +1 -1
  70. data/examples/random/diffusion.rb +1 -1
  71. data/examples/random/generator.rb +2 -2
  72. data/examples/random/randomwalk.rb +3 -3
  73. data/examples/random/rng.rb +1 -1
  74. data/examples/roots/bisection.rb +1 -1
  75. data/examples/roots/brent.rb +1 -1
  76. data/examples/roots/demo.rb +1 -1
  77. data/examples/roots/newton.rb +2 -2
  78. data/examples/roots/recombination.gp +0 -1
  79. data/examples/sf/hyperg.rb +1 -1
  80. data/examples/sf/sphbessel.rb +1 -1
  81. data/examples/sort/sort.rb +1 -1
  82. data/examples/tamu_anova.rb +4 -4
  83. data/examples/vector/add.rb +1 -1
  84. data/examples/vector/decimate.rb +1 -1
  85. data/examples/vector/gnuplot.rb +8 -8
  86. data/examples/vector/vector.rb +2 -2
  87. data/examples/wavelet/wavelet1.rb +1 -1
  88. data/ext/{gsl → gsl_native}/alf.c +9 -9
  89. data/ext/{gsl → gsl_native}/array.c +64 -151
  90. data/ext/{gsl → gsl_native}/array_complex.c +61 -63
  91. data/ext/{gsl → gsl_native}/blas.c +0 -0
  92. data/ext/{gsl → gsl_native}/blas1.c +32 -32
  93. data/ext/{gsl → gsl_native}/blas2.c +54 -58
  94. data/ext/{gsl → gsl_native}/blas3.c +54 -54
  95. data/ext/{gsl → gsl_native}/block.c +3 -6
  96. data/ext/{gsl/block_source.c → gsl_native/block_source.h} +109 -111
  97. data/ext/gsl_native/bspline.c +122 -0
  98. data/ext/{gsl → gsl_native}/bundle.c +0 -0
  99. data/ext/{gsl → gsl_native}/cdf.c +76 -88
  100. data/ext/{gsl → gsl_native}/cheb.c +74 -85
  101. data/ext/{gsl → gsl_native}/combination.c +9 -16
  102. data/ext/{gsl → gsl_native}/common.c +7 -37
  103. data/ext/{gsl → gsl_native}/complex.c +113 -115
  104. data/ext/gsl_native/const.c +331 -0
  105. data/ext/{gsl → gsl_native}/const_additional.c +12 -33
  106. data/ext/gsl_native/cqp.c +283 -0
  107. data/ext/{gsl → gsl_native}/deriv.c +22 -30
  108. data/ext/{gsl → gsl_native}/dht.c +20 -28
  109. data/ext/{gsl → gsl_native}/diff.c +23 -25
  110. data/ext/{gsl → gsl_native}/dirac.c +44 -45
  111. data/ext/{gsl → gsl_native}/eigen.c +1031 -1082
  112. data/ext/{gsl → gsl_native}/error.c +13 -13
  113. data/ext/{gsl → gsl_native}/extconf.rb +5 -13
  114. data/ext/{gsl → gsl_native}/fft.c +192 -198
  115. data/ext/{gsl → gsl_native}/fit.c +16 -16
  116. data/ext/gsl_native/fresnel.c +312 -0
  117. data/ext/{gsl → gsl_native}/function.c +29 -35
  118. data/ext/{gsl → gsl_native}/geometry.c +15 -15
  119. data/ext/{gsl → gsl_native}/graph.c +37 -87
  120. data/ext/{gsl → gsl_native}/gsl.c +10 -23
  121. data/ext/{gsl → gsl_native}/gsl_narray.c +15 -24
  122. data/ext/{gsl → gsl_native}/histogram.c +123 -150
  123. data/ext/{gsl → gsl_native}/histogram2d.c +71 -96
  124. data/ext/{gsl → gsl_native}/histogram3d.c +72 -72
  125. data/ext/{gsl → gsl_native}/histogram3d_source.c +195 -196
  126. data/ext/{gsl → gsl_native}/histogram_find.c +31 -33
  127. data/ext/{gsl → gsl_native}/histogram_oper.c +43 -52
  128. data/ext/{gsl → gsl_native}/ieee.c +7 -15
  129. data/ext/{gsl → gsl_native}/include/rb_gsl.h +0 -7
  130. data/ext/{gsl → gsl_native}/include/rb_gsl_array.h +15 -25
  131. data/ext/{gsl → gsl_native}/include/rb_gsl_cheb.h +0 -0
  132. data/ext/{gsl → gsl_native}/include/rb_gsl_common.h +44 -52
  133. data/ext/{gsl → gsl_native}/include/rb_gsl_complex.h +0 -0
  134. data/ext/{gsl → gsl_native}/include/rb_gsl_const.h +0 -5
  135. data/ext/{gsl → gsl_native}/include/rb_gsl_dirac.h +0 -0
  136. data/ext/{gsl → gsl_native}/include/rb_gsl_eigen.h +0 -0
  137. data/ext/{gsl → gsl_native}/include/rb_gsl_fft.h +0 -3
  138. data/ext/{gsl → gsl_native}/include/rb_gsl_fit.h +0 -0
  139. data/ext/{gsl → gsl_native}/include/rb_gsl_function.h +0 -0
  140. data/ext/{gsl → gsl_native}/include/rb_gsl_graph.h +2 -2
  141. data/ext/{gsl → gsl_native}/include/rb_gsl_histogram.h +8 -8
  142. data/ext/{gsl → gsl_native}/include/rb_gsl_histogram3d.h +50 -50
  143. data/ext/{gsl → gsl_native}/include/rb_gsl_integration.h +0 -0
  144. data/ext/{gsl → gsl_native}/include/rb_gsl_interp.h +0 -0
  145. data/ext/{gsl → gsl_native}/include/rb_gsl_linalg.h +0 -1
  146. data/ext/{gsl → gsl_native}/include/rb_gsl_math.h +0 -4
  147. data/ext/{gsl → gsl_native}/include/rb_gsl_odeiv.h +0 -0
  148. data/ext/{gsl → gsl_native}/include/rb_gsl_poly.h +3 -3
  149. data/ext/{gsl → gsl_native}/include/rb_gsl_rational.h +1 -1
  150. data/ext/{gsl → gsl_native}/include/rb_gsl_rng.h +0 -0
  151. data/ext/{gsl → gsl_native}/include/rb_gsl_root.h +0 -0
  152. data/ext/{gsl → gsl_native}/include/rb_gsl_sf.h +39 -43
  153. data/ext/{gsl → gsl_native}/include/rb_gsl_statistics.h +0 -0
  154. data/ext/{gsl → gsl_native}/include/rb_gsl_tensor.h +0 -0
  155. data/ext/{gsl → gsl_native}/include/rb_gsl_with_narray.h +0 -0
  156. data/ext/{gsl → gsl_native}/include/templates_off.h +0 -0
  157. data/ext/{gsl → gsl_native}/include/templates_on.h +1 -1
  158. data/ext/{gsl → gsl_native}/integration.c +160 -183
  159. data/ext/{gsl → gsl_native}/interp.c +23 -31
  160. data/ext/gsl_native/jacobi.c +733 -0
  161. data/ext/{gsl → gsl_native}/linalg.c +448 -576
  162. data/ext/{gsl → gsl_native}/linalg_complex.c +84 -98
  163. data/ext/{gsl → gsl_native}/math.c +45 -63
  164. data/ext/{gsl → gsl_native}/matrix.c +4 -6
  165. data/ext/{gsl → gsl_native}/matrix_complex.c +111 -114
  166. data/ext/{gsl → gsl_native}/matrix_double.c +74 -77
  167. data/ext/{gsl → gsl_native}/matrix_int.c +49 -50
  168. data/ext/{gsl/matrix_source.c → gsl_native/matrix_source.h} +280 -302
  169. data/ext/{gsl → gsl_native}/min.c +43 -74
  170. data/ext/{gsl → gsl_native}/monte.c +45 -59
  171. data/ext/{gsl → gsl_native}/multifit.c +138 -147
  172. data/ext/{gsl → gsl_native}/multimin.c +55 -83
  173. data/ext/{gsl → gsl_native}/multimin_fsdf.c +15 -15
  174. data/ext/{gsl → gsl_native}/multiroots.c +61 -64
  175. data/ext/{gsl → gsl_native}/multiset.c +3 -7
  176. data/ext/{gsl → gsl_native}/ndlinear.c +320 -321
  177. data/ext/{gsl → gsl_native}/nmf.c +11 -11
  178. data/ext/{gsl → gsl_native}/nmf_wrap.c +1 -1
  179. data/ext/{gsl → gsl_native}/ntuple.c +13 -13
  180. data/ext/{gsl → gsl_native}/odeiv.c +95 -106
  181. data/ext/gsl_native/ool.c +879 -0
  182. data/ext/{gsl → gsl_native}/permutation.c +36 -34
  183. data/ext/{gsl → gsl_native}/poly.c +2 -5
  184. data/ext/{gsl → gsl_native}/poly2.c +6 -6
  185. data/ext/{gsl/poly_source.c → gsl_native/poly_source.h} +232 -275
  186. data/ext/{gsl → gsl_native}/qrng.c +6 -17
  187. data/ext/{gsl → gsl_native}/randist.c +218 -243
  188. data/ext/{gsl → gsl_native}/rational.c +9 -9
  189. data/ext/{gsl → gsl_native}/rng.c +29 -45
  190. data/ext/{gsl → gsl_native}/root.c +43 -43
  191. data/ext/{gsl → gsl_native}/sf.c +163 -197
  192. data/ext/{gsl → gsl_native}/sf_airy.c +0 -0
  193. data/ext/{gsl → gsl_native}/sf_bessel.c +6 -6
  194. data/ext/{gsl → gsl_native}/sf_clausen.c +0 -0
  195. data/ext/{gsl → gsl_native}/sf_coulomb.c +39 -39
  196. data/ext/{gsl → gsl_native}/sf_coupling.c +29 -29
  197. data/ext/{gsl → gsl_native}/sf_dawson.c +0 -0
  198. data/ext/{gsl → gsl_native}/sf_debye.c +0 -9
  199. data/ext/{gsl → gsl_native}/sf_dilog.c +0 -0
  200. data/ext/{gsl → gsl_native}/sf_elementary.c +2 -2
  201. data/ext/{gsl → gsl_native}/sf_ellint.c +42 -42
  202. data/ext/{gsl → gsl_native}/sf_elljac.c +2 -2
  203. data/ext/{gsl → gsl_native}/sf_erfc.c +0 -4
  204. data/ext/{gsl → gsl_native}/sf_exp.c +2 -2
  205. data/ext/{gsl → gsl_native}/sf_expint.c +1 -11
  206. data/ext/{gsl → gsl_native}/sf_fermi_dirac.c +0 -0
  207. data/ext/{gsl → gsl_native}/sf_gamma.c +1 -5
  208. data/ext/{gsl → gsl_native}/sf_gegenbauer.c +0 -0
  209. data/ext/{gsl → gsl_native}/sf_hyperg.c +0 -0
  210. data/ext/{gsl → gsl_native}/sf_laguerre.c +3 -3
  211. data/ext/{gsl → gsl_native}/sf_lambert.c +0 -0
  212. data/ext/{gsl → gsl_native}/sf_legendre.c +0 -0
  213. data/ext/{gsl → gsl_native}/sf_log.c +3 -3
  214. data/ext/gsl_native/sf_mathieu.c +235 -0
  215. data/ext/{gsl → gsl_native}/sf_power.c +0 -0
  216. data/ext/{gsl → gsl_native}/sf_psi.c +2 -11
  217. data/ext/{gsl → gsl_native}/sf_synchrotron.c +0 -0
  218. data/ext/{gsl → gsl_native}/sf_transport.c +0 -0
  219. data/ext/{gsl → gsl_native}/sf_trigonometric.c +3 -3
  220. data/ext/{gsl → gsl_native}/sf_zeta.c +0 -4
  221. data/ext/{gsl → gsl_native}/signal.c +60 -64
  222. data/ext/{gsl → gsl_native}/siman.c +36 -40
  223. data/ext/{gsl → gsl_native}/sort.c +3 -4
  224. data/ext/{gsl → gsl_native}/spline.c +25 -43
  225. data/ext/{gsl → gsl_native}/stats.c +102 -115
  226. data/ext/{gsl → gsl_native}/sum.c +32 -32
  227. data/ext/{gsl → gsl_native}/tamu_anova.c +0 -0
  228. data/ext/{gsl → gsl_native}/tensor.c +2 -4
  229. data/ext/{gsl/tensor_source.c → gsl_native/tensor_source.h} +144 -144
  230. data/ext/{gsl → gsl_native}/vector.c +2 -4
  231. data/ext/{gsl → gsl_native}/vector_complex.c +165 -171
  232. data/ext/{gsl → gsl_native}/vector_double.c +167 -174
  233. data/ext/{gsl → gsl_native}/vector_int.c +23 -25
  234. data/ext/{gsl/vector_source.c → gsl_native/vector_source.h} +400 -414
  235. data/ext/{gsl → gsl_native}/wavelet.c +215 -236
  236. data/lib/gsl.rb +1 -7
  237. data/lib/gsl/gnuplot.rb +2 -2
  238. data/lib/gsl/version.rb +1 -3
  239. data/rb-gsl.gemspec +29 -0
  240. data/rdoc/blas.rdoc +3 -3
  241. data/rdoc/bspline.rdoc +7 -7
  242. data/rdoc/cheb.rdoc +8 -8
  243. data/rdoc/cholesky_complex.rdoc +1 -1
  244. data/rdoc/combi.rdoc +9 -9
  245. data/rdoc/complex.rdoc +11 -11
  246. data/rdoc/const.rdoc +20 -20
  247. data/rdoc/dht.rdoc +6 -6
  248. data/rdoc/diff.rdoc +6 -6
  249. data/rdoc/ehandling.rdoc +3 -3
  250. data/rdoc/eigen.rdoc +11 -11
  251. data/rdoc/fft.rdoc +26 -26
  252. data/rdoc/fit.rdoc +18 -18
  253. data/rdoc/graph.rdoc +2 -2
  254. data/rdoc/hist.rdoc +16 -16
  255. data/rdoc/hist2d.rdoc +4 -4
  256. data/rdoc/hist3d.rdoc +3 -3
  257. data/rdoc/integration.rdoc +16 -16
  258. data/rdoc/interp.rdoc +11 -11
  259. data/rdoc/intro.rdoc +3 -3
  260. data/rdoc/linalg.rdoc +20 -20
  261. data/rdoc/linalg_complex.rdoc +1 -1
  262. data/rdoc/math.rdoc +13 -13
  263. data/rdoc/matrix.rdoc +22 -22
  264. data/rdoc/min.rdoc +9 -9
  265. data/rdoc/monte.rdoc +3 -3
  266. data/rdoc/multimin.rdoc +12 -12
  267. data/rdoc/multiroot.rdoc +12 -12
  268. data/rdoc/narray.rdoc +9 -9
  269. data/rdoc/ndlinear.rdoc +4 -4
  270. data/rdoc/nonlinearfit.rdoc +17 -17
  271. data/rdoc/ntuple.rdoc +5 -5
  272. data/rdoc/odeiv.rdoc +12 -12
  273. data/rdoc/perm.rdoc +11 -11
  274. data/rdoc/poly.rdoc +17 -17
  275. data/rdoc/qrng.rdoc +9 -9
  276. data/rdoc/randist.rdoc +10 -10
  277. data/rdoc/ref.rdoc +49 -49
  278. data/rdoc/rng.rdoc +9 -9
  279. data/rdoc/roots.rdoc +12 -12
  280. data/rdoc/sf.rdoc +35 -35
  281. data/rdoc/siman.rdoc +3 -3
  282. data/rdoc/sort.rdoc +6 -6
  283. data/rdoc/start.rdoc +2 -2
  284. data/rdoc/stats.rdoc +13 -13
  285. data/rdoc/sum.rdoc +4 -4
  286. data/rdoc/tensor.rdoc +3 -3
  287. data/rdoc/tut.rdoc +1 -1
  288. data/rdoc/use.rdoc +3 -3
  289. data/rdoc/vector.rdoc +28 -28
  290. data/rdoc/vector_complex.rdoc +6 -6
  291. data/rdoc/wavelet.rdoc +8 -8
  292. data/test/gsl/blas_test.rb +1 -1
  293. data/test/gsl/index_test.rb +61 -0
  294. data/test/gsl/matrix_test.rb +21 -0
  295. data/uncrustify.cfg +1693 -0
  296. metadata +212 -243
  297. data/README +0 -28
  298. data/ext/gsl/bspline.c +0 -130
  299. data/ext/gsl/const.c +0 -672
  300. data/ext/gsl/cqp.c +0 -283
  301. data/ext/gsl/fcmp.c +0 -64
  302. data/ext/gsl/fresnel.c +0 -312
  303. data/ext/gsl/jacobi.c +0 -739
  304. data/ext/gsl/ool.c +0 -879
  305. data/ext/gsl/oper_complex_source.c +0 -251
  306. data/ext/gsl/sf_mathieu.c +0 -238
  307. data/rdoc/index.rdoc +0 -50
@@ -20,21 +20,21 @@ static VALUE *pgsl_error;
20
20
 
21
21
  static void Init_rb_gsl_define_GSL_CONST(VALUE module);
22
22
  void rb_gsl_error_handler(const char *reason, const char *file,
23
- int line, int gsl_errno);
23
+ int line, int gsl_errno);
24
24
  static void rb_gsl_my_error_handler(const char *reason, const char *file,
25
- int line, int gsl_errno);
25
+ int line, int gsl_errno);
26
26
 
27
27
  void rb_gsl_error_handler(const char *reason, const char *file,
28
- int line, int gsl_errno)
28
+ int line, int gsl_errno)
29
29
  {
30
30
  const char *emessage = gsl_strerror(gsl_errno);
31
- rb_raise(pgsl_error[gsl_errno],
32
- "Ruby/GSL error code %d, %s (file %s, line %d), %s",
33
- gsl_errno, reason, file, line, emessage);
31
+ rb_raise(pgsl_error[gsl_errno],
32
+ "Ruby/GSL error code %d, %s (file %s, line %d), %s",
33
+ gsl_errno, reason, file, line, emessage);
34
34
  }
35
35
 
36
36
  static void rb_gsl_my_error_handler(const char *reason, const char *file,
37
- int line, int gsl_errno)
37
+ int line, int gsl_errno)
38
38
  {
39
39
  VALUE vreason, vfile;
40
40
  VALUE vline, verrno;
@@ -166,14 +166,14 @@ static void define_module_functions(VALUE module);
166
166
  static VALUE rb_gsl_strerror(VALUE obj, VALUE errn);
167
167
  static void define_module_functions(VALUE module)
168
168
  {
169
- rb_define_module_function(module, "set_error_handler_off",
170
- rb_gsl_set_error_handler_off, 0);
171
- rb_define_module_function(module, "strerror",
172
- rb_gsl_strerror, 1);
169
+ rb_define_module_function(module, "set_error_handler_off",
170
+ rb_gsl_set_error_handler_off, 0);
171
+ rb_define_module_function(module, "strerror",
172
+ rb_gsl_strerror, 1);
173
173
  rb_define_module_function(module, "set_error_handler",
174
- rb_gsl_set_error_handler, -1);
174
+ rb_gsl_set_error_handler, -1);
175
175
  rb_define_module_function(module, "set_default_error_handler",
176
- rb_gsl_set_default_error_handler, 0);
176
+ rb_gsl_set_default_error_handler, 0);
177
177
  }
178
178
 
179
179
  static VALUE rb_gsl_strerror(VALUE obj, VALUE errn)
@@ -10,7 +10,8 @@ rescue => err
10
10
  end
11
11
 
12
12
  def gsl_def(const, value = nil)
13
- $defs << "-D#{const}#{"=#{value}" if value}"
13
+ value = "=#{value}" if value
14
+ $defs << "-D#{const}#{value}"
14
15
  end
15
16
 
16
17
  def gsl_have_header(library, header)
@@ -63,14 +64,9 @@ gsl_config_arg(:version) { |version, check|
63
64
  gte && gsl_def("GSL_#{ary.join('_')}_LATER")
64
65
  }
65
66
 
66
- raise 'Ruby/GSL requires gsl-0.9.4 or later.' unless later['0.9.4']
67
+ raise 'Ruby/GSL requires gsl-1.15 or later.' unless later['1.15']
67
68
 
68
- gsl_def(:GSL_1_4_9_LATER) if later['1.4.90']
69
-
70
- %w[
71
- 1.0 1.1 1.1.1 1.2 1.3 1.4 1.5.90 1.7.90
72
- 1.8.90 1.9.90 1.11 1.12.90 1.14 1.15
73
- ].each { |v| later[v] }
69
+ %w[1.15 1.16].each { |v| later[v] }
74
70
  }
75
71
 
76
72
  gsl_config_arg(:cflags) { |cflags, check|
@@ -92,7 +88,6 @@ gsl_config_arg(:libs) { |libs, check|
92
88
  $LOCAL_LIBS += ' ' + check[libs]
93
89
  }
94
90
 
95
- have_header('ruby/io.h')
96
91
  have_func('round')
97
92
 
98
93
  %w[alf qrngextra rngextra tensor].each { |library|
@@ -120,7 +115,4 @@ unless arg_config('--disable-tamu-anova')
120
115
  gsl_have_header('tamuanova', 'tamu_anova/tamu_anova.h')
121
116
  end
122
117
 
123
- $objs = Dir["#{File.dirname(__FILE__)}/*.c"].map { |f| File.basename(f, '.c') << '.o' }.
124
- sort - %w[block matrix poly tensor vector].map { |f| "#{f}_source.o" }
125
-
126
- create_makefile('gsl/gsl_native')
118
+ create_makefile('gsl_native')
@@ -25,24 +25,24 @@ static void GSL_FFT_Workspace_free(GSL_FFT_Workspace *space);
25
25
  static VALUE rb_gsl_fft_complex_wavetable_new(VALUE klass, VALUE n)
26
26
  {
27
27
  CHECK_FIXNUM(n);
28
- return Data_Wrap_Struct(cgsl_fft_complex_wavetable, 0,
29
- gsl_fft_complex_wavetable_free,
30
- gsl_fft_complex_wavetable_alloc(FIX2INT(n)));
28
+ return Data_Wrap_Struct(cgsl_fft_complex_wavetable, 0,
29
+ gsl_fft_complex_wavetable_free,
30
+ gsl_fft_complex_wavetable_alloc(FIX2INT(n)));
31
31
  }
32
32
 
33
33
  static VALUE rb_gsl_fft_real_wavetable_new(VALUE klass, VALUE n)
34
34
  {
35
35
  CHECK_FIXNUM(n);
36
36
  return Data_Wrap_Struct(klass, 0, gsl_fft_real_wavetable_free,
37
- gsl_fft_real_wavetable_alloc(FIX2INT(n)));
37
+ gsl_fft_real_wavetable_alloc(FIX2INT(n)));
38
38
  }
39
39
 
40
40
  static VALUE rb_gsl_fft_halfcomplex_wavetable_new(VALUE klass, VALUE n)
41
41
  {
42
42
  CHECK_FIXNUM(n);
43
43
  return Data_Wrap_Struct(klass, 0, gsl_fft_halfcomplex_wavetable_free,
44
- gsl_fft_halfcomplex_wavetable_alloc(FIX2INT(n)));
45
-
44
+ gsl_fft_halfcomplex_wavetable_alloc(FIX2INT(n)));
45
+
46
46
  }
47
47
 
48
48
  static void GSL_FFT_Wavetable_free(GSL_FFT_Wavetable *table)
@@ -54,21 +54,21 @@ static VALUE rb_gsl_fft_complex_workspace_new(VALUE klass, VALUE n)
54
54
  {
55
55
  CHECK_FIXNUM(n);
56
56
  return Data_Wrap_Struct(klass, 0, gsl_fft_complex_workspace_free,
57
- gsl_fft_complex_workspace_alloc(FIX2INT(n)));
57
+ gsl_fft_complex_workspace_alloc(FIX2INT(n)));
58
58
  }
59
59
 
60
60
  static VALUE rb_gsl_fft_real_workspace_new(VALUE klass, VALUE n)
61
61
  {
62
62
  CHECK_FIXNUM(n);
63
63
  return Data_Wrap_Struct(klass, 0, gsl_fft_real_workspace_free,
64
- gsl_fft_real_workspace_alloc(FIX2INT(n)));
64
+ gsl_fft_real_workspace_alloc(FIX2INT(n)));
65
65
  }
66
66
 
67
67
  static void GSL_FFT_Workspace_free(GSL_FFT_Workspace *space)
68
68
  {
69
69
  gsl_fft_complex_workspace_free((gsl_fft_complex_workspace *) space);
70
70
  }
71
-
71
+
72
72
  // The FFT methods used to allow passing stride and n values as optional
73
73
  // parameters to control which elements get transformed. This created problems
74
74
  // for Views which can have their own stride, so support for stride and n
@@ -79,8 +79,8 @@ static void GSL_FFT_Workspace_free(GSL_FFT_Workspace *space)
79
79
  // refactoring, it has been left in place for the time being. Eventually it
80
80
  // can be refactored away completely.
81
81
  static VALUE get_complex_stride_n(VALUE obj,
82
- gsl_vector_complex **vin,
83
- gsl_complex_packed_array *data, size_t *stride, size_t *n)
82
+ gsl_vector_complex **vin,
83
+ gsl_complex_packed_array *data, size_t *stride, size_t *n)
84
84
  {
85
85
  gsl_vector_complex *v = NULL;
86
86
 
@@ -96,8 +96,8 @@ static VALUE get_complex_stride_n(VALUE obj,
96
96
  }
97
97
 
98
98
  static VALUE rb_fft_complex_radix2(VALUE obj,
99
- int (*trans)(gsl_complex_packed_array,
100
- size_t, size_t), int flag)
99
+ int (*trans)(gsl_complex_packed_array,
100
+ size_t, size_t), int flag)
101
101
  {
102
102
  size_t stride, n;
103
103
  gsl_complex_packed_array data;
@@ -106,7 +106,7 @@ static VALUE rb_fft_complex_radix2(VALUE obj,
106
106
  ary = get_complex_stride_n(obj, &vin, &data, &stride, &n);
107
107
  if (flag == RB_GSL_FFT_COPY) {
108
108
  vout = gsl_vector_complex_alloc(n);
109
- gsl_vector_complex_memcpy(vout, vin);
109
+ gsl_vector_complex_memcpy(vout, vin);
110
110
  (*trans)(vout->data, vout->stride /*1*/, vout->size /*n*/);
111
111
  return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, vout);
112
112
  } else { /* in-place */
@@ -118,13 +118,13 @@ static VALUE rb_fft_complex_radix2(VALUE obj,
118
118
  static VALUE rb_gsl_fft_complex_radix2_forward(VALUE obj)
119
119
  {
120
120
  return rb_fft_complex_radix2(obj, gsl_fft_complex_radix2_forward,
121
- RB_GSL_FFT_COPY);
121
+ RB_GSL_FFT_COPY);
122
122
  }
123
123
 
124
124
  static VALUE rb_gsl_fft_complex_radix2_forward2(VALUE obj)
125
125
  {
126
126
  return rb_fft_complex_radix2(obj, gsl_fft_complex_radix2_forward,
127
- RB_GSL_FFT_INPLACE);
127
+ RB_GSL_FFT_INPLACE);
128
128
  }
129
129
 
130
130
  static VALUE rb_gsl_fft_complex_radix2_transform(VALUE obj, VALUE val_sign)
@@ -136,7 +136,7 @@ static VALUE rb_gsl_fft_complex_radix2_transform(VALUE obj, VALUE val_sign)
136
136
  sign = NUM2INT(val_sign);
137
137
  get_complex_stride_n(obj, &vin, &data, &stride, &n);
138
138
  vout = gsl_vector_complex_alloc(n);
139
- gsl_vector_complex_memcpy(vout, vin);
139
+ gsl_vector_complex_memcpy(vout, vin);
140
140
  gsl_fft_complex_radix2_transform(vout->data, vout->stride /*1*/, vout->size /*n*/, sign);
141
141
  return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, vout);
142
142
  }
@@ -156,40 +156,40 @@ static VALUE rb_gsl_fft_complex_radix2_transform2(VALUE obj, VALUE val_sign)
156
156
  static VALUE rb_gsl_fft_complex_radix2_backward(VALUE obj)
157
157
  {
158
158
  return rb_fft_complex_radix2(obj, gsl_fft_complex_radix2_backward,
159
- RB_GSL_FFT_COPY);
159
+ RB_GSL_FFT_COPY);
160
160
  }
161
161
 
162
162
  static VALUE rb_gsl_fft_complex_radix2_inverse(VALUE obj)
163
163
  {
164
164
  return rb_fft_complex_radix2(obj, gsl_fft_complex_radix2_inverse,
165
- RB_GSL_FFT_COPY);
165
+ RB_GSL_FFT_COPY);
166
166
  }
167
167
 
168
168
  static VALUE rb_gsl_fft_complex_radix2_dif_forward(VALUE obj)
169
169
  {
170
- return rb_fft_complex_radix2(obj,
171
- gsl_fft_complex_radix2_dif_forward,
172
- RB_GSL_FFT_COPY);
170
+ return rb_fft_complex_radix2(obj,
171
+ gsl_fft_complex_radix2_dif_forward,
172
+ RB_GSL_FFT_COPY);
173
173
  }
174
174
 
175
175
  static VALUE rb_gsl_fft_complex_radix2_backward2(VALUE obj)
176
176
  {
177
177
  return rb_fft_complex_radix2(obj, gsl_fft_complex_radix2_backward,
178
- RB_GSL_FFT_INPLACE);
178
+ RB_GSL_FFT_INPLACE);
179
179
  }
180
180
 
181
181
  static VALUE rb_gsl_fft_complex_radix2_inverse2(VALUE obj)
182
182
  {
183
183
  return rb_fft_complex_radix2(obj, gsl_fft_complex_radix2_inverse,
184
- RB_GSL_FFT_INPLACE);
184
+ RB_GSL_FFT_INPLACE);
185
185
  }
186
186
 
187
187
 
188
188
  static VALUE rb_gsl_fft_complex_radix2_dif_forward2(VALUE obj)
189
189
  {
190
- return rb_fft_complex_radix2(obj,
191
- gsl_fft_complex_radix2_dif_forward,
192
- RB_GSL_FFT_INPLACE);
190
+ return rb_fft_complex_radix2(obj,
191
+ gsl_fft_complex_radix2_dif_forward,
192
+ RB_GSL_FFT_INPLACE);
193
193
  }
194
194
 
195
195
  static VALUE rb_gsl_fft_complex_radix2_dif_transform(VALUE obj, VALUE val_sign)
@@ -201,7 +201,7 @@ static VALUE rb_gsl_fft_complex_radix2_dif_transform(VALUE obj, VALUE val_sign)
201
201
  sign = NUM2INT(val_sign);
202
202
  get_complex_stride_n(obj, &vin, &data, &stride, &n);
203
203
  vout = gsl_vector_complex_alloc(n);
204
- gsl_vector_complex_memcpy(vout, vin);
204
+ gsl_vector_complex_memcpy(vout, vin);
205
205
  gsl_fft_complex_radix2_dif_transform(vout->data, vout->stride /*1*/, vout->size /*n*/, sign);
206
206
  return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, vout);
207
207
  }
@@ -221,28 +221,28 @@ static VALUE rb_gsl_fft_complex_radix2_dif_transform2(VALUE obj, VALUE val_sign)
221
221
 
222
222
  static VALUE rb_gsl_fft_complex_radix2_dif_backward(VALUE obj)
223
223
  {
224
- return rb_fft_complex_radix2(obj,
225
- gsl_fft_complex_radix2_dif_backward,
226
- RB_GSL_FFT_COPY);
224
+ return rb_fft_complex_radix2(obj,
225
+ gsl_fft_complex_radix2_dif_backward,
226
+ RB_GSL_FFT_COPY);
227
227
  }
228
228
  static VALUE rb_gsl_fft_complex_radix2_dif_inverse(VALUE obj)
229
229
  {
230
- return rb_fft_complex_radix2(obj,
231
- gsl_fft_complex_radix2_dif_inverse,
232
- RB_GSL_FFT_COPY);
230
+ return rb_fft_complex_radix2(obj,
231
+ gsl_fft_complex_radix2_dif_inverse,
232
+ RB_GSL_FFT_COPY);
233
233
  }
234
234
 
235
235
  static VALUE rb_gsl_fft_complex_radix2_dif_backward2(VALUE obj)
236
236
  {
237
- return rb_fft_complex_radix2(obj,
238
- gsl_fft_complex_radix2_dif_backward,
239
- RB_GSL_FFT_INPLACE);
237
+ return rb_fft_complex_radix2(obj,
238
+ gsl_fft_complex_radix2_dif_backward,
239
+ RB_GSL_FFT_INPLACE);
240
240
  }
241
241
  static VALUE rb_gsl_fft_complex_radix2_dif_inverse2(VALUE obj)
242
242
  {
243
- return rb_fft_complex_radix2(obj,
244
- gsl_fft_complex_radix2_dif_inverse,
245
- RB_GSL_FFT_INPLACE);
243
+ return rb_fft_complex_radix2(obj,
244
+ gsl_fft_complex_radix2_dif_inverse,
245
+ RB_GSL_FFT_INPLACE);
246
246
  }
247
247
 
248
248
  static VALUE rb_GSL_FFT_Wavetable_n(VALUE obj)
@@ -278,16 +278,16 @@ enum {
278
278
  } FFTComplexStructAllocFlag;
279
279
 
280
280
  static void gsl_fft_free(int flag, GSL_FFT_Wavetable *table,
281
- GSL_FFT_Workspace *space);
281
+ GSL_FFT_Workspace *space);
282
282
 
283
283
  // Parse argc, argv. obj must be GSL::Vector::Complex.
284
284
  // This can be simplified at some point.
285
285
  // See comments preceding get_complex_stride_n()
286
286
  static int gsl_fft_get_argv_complex(int argc, VALUE *argv, VALUE obj,
287
- gsl_vector_complex ** vin,
288
- gsl_complex_packed_array *data, size_t *stride,
289
- size_t *n, gsl_fft_complex_wavetable **table,
290
- gsl_fft_complex_workspace **space)
287
+ gsl_vector_complex ** vin,
288
+ gsl_complex_packed_array *data, size_t *stride,
289
+ size_t *n, gsl_fft_complex_wavetable **table,
290
+ gsl_fft_complex_workspace **space)
291
291
  {
292
292
  int flag = NONE_OF_TWO, flagtmp, i, itmp = argc, itmp2 = 0, ccc;
293
293
  int flagw = 0;
@@ -336,9 +336,9 @@ static int gsl_fft_get_argv_complex(int argc, VALUE *argv, VALUE obj,
336
336
 
337
337
  // Parse argc, argv. obj must be GSL::Vector of real data
338
338
  static int gsl_fft_get_argv_real(int argc, VALUE *argv, VALUE obj,
339
- double **ptr, size_t *stride,
340
- size_t *n, gsl_fft_real_wavetable **table,
341
- gsl_fft_real_workspace **space, int *naflag)
339
+ double **ptr, size_t *stride,
340
+ size_t *n, gsl_fft_real_wavetable **table,
341
+ gsl_fft_real_workspace **space, int *naflag)
342
342
  {
343
343
  int flag = NONE_OF_TWO, flagtmp, i, itmp = argc, itmp2 = 0, ccc;
344
344
  int flagw = 0;
@@ -387,9 +387,9 @@ static int gsl_fft_get_argv_real(int argc, VALUE *argv, VALUE obj,
387
387
 
388
388
  // Parse argc, argv. obj must be GSL::Vector of halfcomplex data
389
389
  static int gsl_fft_get_argv_halfcomplex(int argc, VALUE *argv, VALUE obj,
390
- double **ptr, size_t *stride,
391
- size_t *n, gsl_fft_halfcomplex_wavetable **table,
392
- gsl_fft_real_workspace **space, int *naflag)
390
+ double **ptr, size_t *stride,
391
+ size_t *n, gsl_fft_halfcomplex_wavetable **table,
392
+ gsl_fft_real_workspace **space, int *naflag)
393
393
  {
394
394
  int flag = NONE_OF_TWO, flagtmp, i, itmp = argc, itmp2 = 0, ccc;
395
395
  int flagw = 0;
@@ -436,7 +436,7 @@ static int gsl_fft_get_argv_halfcomplex(int argc, VALUE *argv, VALUE obj,
436
436
  }
437
437
 
438
438
  static void gsl_fft_free(int flag, GSL_FFT_Wavetable *table,
439
- GSL_FFT_Workspace *space)
439
+ GSL_FFT_Workspace *space)
440
440
  {
441
441
  switch (flag) {
442
442
  case ALLOC_TABLE:
@@ -456,11 +456,11 @@ static void gsl_fft_free(int flag, GSL_FFT_Wavetable *table,
456
456
  }
457
457
 
458
458
  static VALUE rb_fft_complex_trans(int argc, VALUE *argv, VALUE obj,
459
- int (*transform)(gsl_complex_packed_array,
460
- size_t, size_t,
461
- const gsl_fft_complex_wavetable *,
462
- gsl_fft_complex_workspace *),
463
- int sss)
459
+ int (*transform)(gsl_complex_packed_array,
460
+ size_t, size_t,
461
+ const gsl_fft_complex_wavetable *,
462
+ gsl_fft_complex_workspace *),
463
+ int sss)
464
464
  {
465
465
  int flag = 0;
466
466
  // local variable "status" was defined and set, but never used
@@ -487,13 +487,13 @@ static VALUE rb_fft_complex_trans(int argc, VALUE *argv, VALUE obj,
487
487
  static VALUE rb_gsl_fft_complex_forward(int argc, VALUE *argv, VALUE obj)
488
488
  {
489
489
  return rb_fft_complex_trans(argc, argv, obj, gsl_fft_complex_forward,
490
- RB_GSL_FFT_COPY);
490
+ RB_GSL_FFT_COPY);
491
491
  }
492
492
 
493
493
  static VALUE rb_gsl_fft_complex_forward2(int argc, VALUE *argv, VALUE obj)
494
494
  {
495
495
  return rb_fft_complex_trans(argc, argv, obj, gsl_fft_complex_forward,
496
- RB_GSL_FFT_INPLACE);
496
+ RB_GSL_FFT_INPLACE);
497
497
  }
498
498
 
499
499
  static VALUE rb_gsl_fft_complex_transform(int argc, VALUE *argv, VALUE obj)
@@ -539,25 +539,25 @@ static VALUE rb_gsl_fft_complex_transform2(int argc, VALUE *argv, VALUE obj)
539
539
  static VALUE rb_gsl_fft_complex_backward(int argc, VALUE *argv, VALUE obj)
540
540
  {
541
541
  return rb_fft_complex_trans(argc, argv, obj, gsl_fft_complex_backward,
542
- RB_GSL_FFT_COPY);
542
+ RB_GSL_FFT_COPY);
543
543
  }
544
544
 
545
545
  static VALUE rb_gsl_fft_complex_backward2(int argc, VALUE *argv, VALUE obj)
546
546
  {
547
547
  return rb_fft_complex_trans(argc, argv, obj, gsl_fft_complex_backward,
548
- RB_GSL_FFT_INPLACE);
548
+ RB_GSL_FFT_INPLACE);
549
549
  }
550
550
 
551
551
  static VALUE rb_gsl_fft_complex_inverse(int argc, VALUE *argv, VALUE obj)
552
552
  {
553
553
  return rb_fft_complex_trans(argc, argv, obj, gsl_fft_complex_inverse,
554
- RB_GSL_FFT_COPY);
554
+ RB_GSL_FFT_COPY);
555
555
  }
556
556
 
557
557
  static VALUE rb_gsl_fft_complex_inverse2(int argc, VALUE *argv, VALUE obj)
558
558
  {
559
559
  return rb_fft_complex_trans(argc, argv, obj, gsl_fft_complex_inverse,
560
- RB_GSL_FFT_INPLACE);
560
+ RB_GSL_FFT_INPLACE);
561
561
  }
562
562
 
563
563
  // The FFT methods used to allow passing stride and n values as optional
@@ -572,7 +572,7 @@ static VALUE rb_gsl_fft_complex_inverse2(int argc, VALUE *argv, VALUE obj)
572
572
  //
573
573
  // obj must be GSL::Vector of real or halfcomplex data
574
574
  static VALUE get_ptr_stride_n(VALUE obj,
575
- double **ptr, size_t *stride, size_t *n, int *flag)
575
+ double **ptr, size_t *stride, size_t *n, int *flag)
576
576
  {
577
577
  *flag = 0;
578
578
  *ptr = get_ptr_double3(obj, n, stride, flag);
@@ -580,17 +580,14 @@ static VALUE get_ptr_stride_n(VALUE obj,
580
580
  }
581
581
 
582
582
  static VALUE rb_fft_radix2(VALUE obj,
583
- int (*trans)(double [], size_t, size_t),
584
- int sss)
583
+ int (*trans)(double [], size_t, size_t),
584
+ int sss)
585
585
  {
586
586
  size_t stride, n;
587
587
  gsl_vector *vnew;
588
588
  gsl_vector_view vv;
589
589
  double *ptr1, *ptr2;
590
590
  int flag;
591
- #ifdef HAVE_NARRAY_H
592
- int shape[1];
593
- #endif
594
591
  VALUE ary;
595
592
  get_ptr_stride_n(obj, &ptr1, &stride, &n, &flag);
596
593
  if (flag == 0) {
@@ -610,6 +607,7 @@ static VALUE rb_fft_radix2(VALUE obj,
610
607
  #ifdef HAVE_NARRAY_H
611
608
  } else if (flag == 1) {
612
609
  if (sss == RB_GSL_FFT_COPY) {
610
+ int shape[1];
613
611
  shape[0] = n;
614
612
  ary = na_make_object(NA_DFLOAT, 1, shape, cNArray);
615
613
  ptr2 = NA_PTR_TYPE(ary, double*);
@@ -630,46 +628,46 @@ static VALUE rb_fft_radix2(VALUE obj,
630
628
  static VALUE rb_gsl_fft_real_radix2_transform(VALUE obj)
631
629
  {
632
630
  return rb_fft_radix2(obj, gsl_fft_real_radix2_transform,
633
- RB_GSL_FFT_COPY);
631
+ RB_GSL_FFT_COPY);
634
632
  }
635
633
 
636
634
  static VALUE rb_gsl_fft_real_radix2_transform2(VALUE obj)
637
635
  {
638
636
  return rb_fft_radix2(obj, gsl_fft_real_radix2_transform,
639
- RB_GSL_FFT_INPLACE);
637
+ RB_GSL_FFT_INPLACE);
640
638
  }
641
639
 
642
640
  static VALUE rb_gsl_fft_halfcomplex_radix2_inverse(VALUE obj)
643
641
  {
644
642
  return rb_fft_radix2(obj, gsl_fft_halfcomplex_radix2_inverse,
645
- RB_GSL_FFT_COPY);
643
+ RB_GSL_FFT_COPY);
646
644
  }
647
645
 
648
646
  static VALUE rb_gsl_fft_halfcomplex_radix2_inverse2(VALUE obj)
649
647
  {
650
648
  return rb_fft_radix2(obj, gsl_fft_halfcomplex_radix2_inverse,
651
- RB_GSL_FFT_INPLACE);
649
+ RB_GSL_FFT_INPLACE);
652
650
  }
653
651
 
654
652
  static VALUE rb_gsl_fft_halfcomplex_radix2_backward(VALUE obj)
655
653
  {
656
654
  return rb_fft_radix2(obj, gsl_fft_halfcomplex_radix2_backward,
657
- RB_GSL_FFT_COPY);
655
+ RB_GSL_FFT_COPY);
658
656
  }
659
657
 
660
658
  static VALUE rb_gsl_fft_halfcomplex_radix2_backward2(VALUE obj)
661
659
  {
662
660
  return rb_fft_radix2(obj, gsl_fft_halfcomplex_radix2_backward,
663
- RB_GSL_FFT_INPLACE);
661
+ RB_GSL_FFT_INPLACE);
664
662
  }
665
663
 
666
664
  /*****/
667
665
 
668
666
  static VALUE rb_fft_real_trans(int argc, VALUE *argv, VALUE obj,
669
- int (*trans)(double [], size_t, size_t,
670
- const gsl_fft_real_wavetable *,
671
- gsl_fft_real_workspace *),
672
- int sss)
667
+ int (*trans)(double [], size_t, size_t,
668
+ const gsl_fft_real_wavetable *,
669
+ gsl_fft_real_workspace *),
670
+ int sss)
673
671
  {
674
672
  int flag = 0, naflag = 0;
675
673
  // local variable "status" was defined and set, but never used
@@ -678,9 +676,6 @@ static VALUE rb_fft_real_trans(int argc, VALUE *argv, VALUE obj,
678
676
  gsl_vector *vnew;
679
677
  gsl_vector_view vv;
680
678
  double *ptr1, *ptr2;
681
- #ifdef HAVE_NARRAY_H
682
- int shape[1];
683
- #endif
684
679
  gsl_fft_real_wavetable *table = NULL;
685
680
  gsl_fft_real_workspace *space = NULL;
686
681
  VALUE ary;
@@ -702,6 +697,7 @@ static VALUE rb_fft_real_trans(int argc, VALUE *argv, VALUE obj,
702
697
  #ifdef HAVE_NARRAY_H
703
698
  } else if (naflag == 1) {
704
699
  if (sss == RB_GSL_FFT_COPY) {
700
+ int shape[1];
705
701
  shape[0] = n;
706
702
  ary = na_make_object(NA_DFLOAT, 1, shape, cNArray);
707
703
  ptr2 = NA_PTR_TYPE(ary, double*);
@@ -723,19 +719,19 @@ static VALUE rb_fft_real_trans(int argc, VALUE *argv, VALUE obj,
723
719
  static VALUE rb_gsl_fft_real_transform(int argc, VALUE *argv, VALUE obj)
724
720
  {
725
721
  return rb_fft_real_trans(argc, argv, obj, gsl_fft_real_transform,
726
- RB_GSL_FFT_COPY);
722
+ RB_GSL_FFT_COPY);
727
723
  }
728
724
 
729
725
  static VALUE rb_gsl_fft_real_transform2(int argc, VALUE *argv, VALUE obj)
730
726
  {
731
727
  return rb_fft_real_trans(argc, argv, obj, gsl_fft_real_transform,
732
- RB_GSL_FFT_INPLACE);
728
+ RB_GSL_FFT_INPLACE);
733
729
  }
734
730
 
735
731
  static VALUE rb_fft_halfcomplex_trans(int argc, VALUE *argv, VALUE obj,
736
- int (*trans)(double [], size_t, size_t,
737
- const gsl_fft_halfcomplex_wavetable *, gsl_fft_real_workspace *),
738
- int sss)
732
+ int (*trans)(double [], size_t, size_t,
733
+ const gsl_fft_halfcomplex_wavetable *, gsl_fft_real_workspace *),
734
+ int sss)
739
735
  {
740
736
  int flag = 0, naflag = 0;
741
737
  // local variable "status" was defined and set, but never used
@@ -744,14 +740,11 @@ static VALUE rb_fft_halfcomplex_trans(int argc, VALUE *argv, VALUE obj,
744
740
  gsl_vector *vnew;
745
741
  gsl_vector_view vv;
746
742
  double *ptr1, *ptr2;
747
- #ifdef HAVE_NARRAY_H
748
- int shape[1];
749
- #endif
750
743
  gsl_fft_halfcomplex_wavetable *table = NULL;
751
744
  gsl_fft_real_workspace *space = NULL;
752
745
  VALUE ary;
753
- flag = gsl_fft_get_argv_halfcomplex(argc, argv, obj, &ptr1, &stride, &n,
754
- &table, &space, &naflag);
746
+ flag = gsl_fft_get_argv_halfcomplex(argc, argv, obj, &ptr1, &stride, &n,
747
+ &table, &space, &naflag);
755
748
  if (naflag == 0) {
756
749
  if (sss == RB_GSL_FFT_COPY) {
757
750
  vnew = gsl_vector_alloc(n);
@@ -769,6 +762,7 @@ static VALUE rb_fft_halfcomplex_trans(int argc, VALUE *argv, VALUE obj,
769
762
  #ifdef HAVE_NARRAY_H
770
763
  } else if (naflag == 1) {
771
764
  if (sss == RB_GSL_FFT_COPY) {
765
+ int shape[1];
772
766
  shape[0] = n;
773
767
  ary = na_make_object(NA_DFLOAT, 1, shape, cNArray);
774
768
  ptr2 = NA_PTR_TYPE(ary, double*);
@@ -789,44 +783,44 @@ static VALUE rb_fft_halfcomplex_trans(int argc, VALUE *argv, VALUE obj,
789
783
 
790
784
  static VALUE rb_gsl_fft_halfcomplex_transform(int argc, VALUE *argv, VALUE obj)
791
785
  {
792
- return rb_fft_halfcomplex_trans(argc, argv, obj,
793
- gsl_fft_halfcomplex_transform,
794
- RB_GSL_FFT_COPY);
786
+ return rb_fft_halfcomplex_trans(argc, argv, obj,
787
+ gsl_fft_halfcomplex_transform,
788
+ RB_GSL_FFT_COPY);
795
789
  }
796
790
 
797
791
  static VALUE rb_gsl_fft_halfcomplex_transform2(int argc, VALUE *argv, VALUE obj)
798
792
  {
799
- return rb_fft_halfcomplex_trans(argc, argv, obj,
800
- gsl_fft_halfcomplex_transform,
801
- RB_GSL_FFT_INPLACE);
793
+ return rb_fft_halfcomplex_trans(argc, argv, obj,
794
+ gsl_fft_halfcomplex_transform,
795
+ RB_GSL_FFT_INPLACE);
802
796
  }
803
797
 
804
798
  static VALUE rb_gsl_fft_halfcomplex_backward(int argc, VALUE *argv, VALUE obj)
805
799
  {
806
- return rb_fft_halfcomplex_trans(argc, argv, obj,
807
- gsl_fft_halfcomplex_backward,
808
- RB_GSL_FFT_COPY);
800
+ return rb_fft_halfcomplex_trans(argc, argv, obj,
801
+ gsl_fft_halfcomplex_backward,
802
+ RB_GSL_FFT_COPY);
809
803
  }
810
804
 
811
805
  static VALUE rb_gsl_fft_halfcomplex_backward2(int argc, VALUE *argv, VALUE obj)
812
806
  {
813
- return rb_fft_halfcomplex_trans(argc, argv, obj,
814
- gsl_fft_halfcomplex_backward,
815
- RB_GSL_FFT_INPLACE);
807
+ return rb_fft_halfcomplex_trans(argc, argv, obj,
808
+ gsl_fft_halfcomplex_backward,
809
+ RB_GSL_FFT_INPLACE);
816
810
  }
817
811
 
818
812
  static VALUE rb_gsl_fft_halfcomplex_inverse(int argc, VALUE *argv, VALUE obj)
819
813
  {
820
- return rb_fft_halfcomplex_trans(argc, argv, obj,
821
- gsl_fft_halfcomplex_inverse,
822
- RB_GSL_FFT_COPY);
814
+ return rb_fft_halfcomplex_trans(argc, argv, obj,
815
+ gsl_fft_halfcomplex_inverse,
816
+ RB_GSL_FFT_COPY);
823
817
  }
824
818
 
825
819
  static VALUE rb_gsl_fft_halfcomplex_inverse2(int argc, VALUE *argv, VALUE obj)
826
820
  {
827
- return rb_fft_halfcomplex_trans(argc, argv, obj,
828
- gsl_fft_halfcomplex_inverse,
829
- RB_GSL_FFT_INPLACE);
821
+ return rb_fft_halfcomplex_trans(argc, argv, obj,
822
+ gsl_fft_halfcomplex_inverse,
823
+ RB_GSL_FFT_INPLACE);
830
824
  }
831
825
 
832
826
  static VALUE rb_gsl_fft_real_unpack(VALUE obj)
@@ -867,7 +861,7 @@ static VALUE rb_gsl_fft_halfcomplex_to_nrc(VALUE obj)
867
861
  vnew = gsl_vector_alloc(v->size);
868
862
  gsl_vector_set(vnew, 0, gsl_vector_get(v, 0)); /* DC */
869
863
  gsl_vector_set(vnew, 1, gsl_vector_get(v, v->size/2)); /* Nyquist freq */
870
- for (i = 2, k = 1; i < vnew->size; i+=2, k++) {
864
+ for (i = 2, k = 1; i < vnew->size; i += 2, k++) {
871
865
  gsl_vector_set(vnew, i, gsl_vector_get(v, k));
872
866
  gsl_vector_set(vnew, i+1, -gsl_vector_get(v, v->size-k));
873
867
  }
@@ -886,12 +880,12 @@ static VALUE rb_gsl_fft_halfcomplex_amp_phase(VALUE obj)
886
880
  amp = gsl_vector_alloc(v->size/2);
887
881
  phase = gsl_vector_alloc(v->size/2);
888
882
  gsl_vector_set(amp, 0, gsl_vector_get(v, 0));
889
- gsl_vector_set(phase, 0, 0);
883
+ gsl_vector_set(phase, 0, 0);
890
884
  gsl_vector_set(amp, amp->size-1, gsl_vector_get(v, v->size-1));
891
- gsl_vector_set(phase, phase->size-1, 0);
892
- for (i = 1; i < v->size-1; i+=2) {
885
+ gsl_vector_set(phase, phase->size-1, 0);
886
+ for (i = 1; i < v->size-1; i += 2) {
893
887
  re = gsl_vector_get(v, i);
894
- im = gsl_vector_get(v, i+1);
888
+ im = gsl_vector_get(v, i+1);
895
889
  gsl_vector_set(amp, i/2+1, sqrt(re*re + im*im));
896
890
  gsl_vector_set(phase, i/2+1, atan2(im, re));
897
891
  }
@@ -912,40 +906,40 @@ void Init_gsl_fft(VALUE module)
912
906
  rb_define_const(mgsl_fft, "BACKWARD", INT2FIX(gsl_fft_backward));
913
907
 
914
908
  /* Transforms for complex vectors */
915
- rb_define_method(cgsl_vector_complex, "radix2_forward",
916
- rb_gsl_fft_complex_radix2_forward, 0);
917
- rb_define_method(cgsl_vector_complex, "radix2_transform",
918
- rb_gsl_fft_complex_radix2_transform, 1);
919
- rb_define_method(cgsl_vector_complex, "radix2_backward",
920
- rb_gsl_fft_complex_radix2_backward, 0);
921
- rb_define_method(cgsl_vector_complex, "radix2_inverse",
922
- rb_gsl_fft_complex_radix2_inverse, 0);
923
- rb_define_method(cgsl_vector_complex, "radix2_dif_forward",
924
- rb_gsl_fft_complex_radix2_dif_forward, 0);
925
- rb_define_method(cgsl_vector_complex, "radix2_dif_transform",
926
- rb_gsl_fft_complex_radix2_dif_transform, 1);
927
- rb_define_method(cgsl_vector_complex, "radix2_dif_backward",
928
- rb_gsl_fft_complex_radix2_dif_backward, 0);
929
- rb_define_method(cgsl_vector_complex, "radix2_dif_inverse",
930
- rb_gsl_fft_complex_radix2_dif_inverse, 0);
909
+ rb_define_method(cgsl_vector_complex, "radix2_forward",
910
+ rb_gsl_fft_complex_radix2_forward, 0);
911
+ rb_define_method(cgsl_vector_complex, "radix2_transform",
912
+ rb_gsl_fft_complex_radix2_transform, 1);
913
+ rb_define_method(cgsl_vector_complex, "radix2_backward",
914
+ rb_gsl_fft_complex_radix2_backward, 0);
915
+ rb_define_method(cgsl_vector_complex, "radix2_inverse",
916
+ rb_gsl_fft_complex_radix2_inverse, 0);
917
+ rb_define_method(cgsl_vector_complex, "radix2_dif_forward",
918
+ rb_gsl_fft_complex_radix2_dif_forward, 0);
919
+ rb_define_method(cgsl_vector_complex, "radix2_dif_transform",
920
+ rb_gsl_fft_complex_radix2_dif_transform, 1);
921
+ rb_define_method(cgsl_vector_complex, "radix2_dif_backward",
922
+ rb_gsl_fft_complex_radix2_dif_backward, 0);
923
+ rb_define_method(cgsl_vector_complex, "radix2_dif_inverse",
924
+ rb_gsl_fft_complex_radix2_dif_inverse, 0);
931
925
 
932
926
  /* In-place radix-2 transforms for complex vectors */
933
- rb_define_method(cgsl_vector_complex, "radix2_forward!",
934
- rb_gsl_fft_complex_radix2_forward2, 0);
927
+ rb_define_method(cgsl_vector_complex, "radix2_forward!",
928
+ rb_gsl_fft_complex_radix2_forward2, 0);
935
929
  rb_define_method(cgsl_vector_complex, "radix2_transform!",
936
- rb_gsl_fft_complex_radix2_transform2, 1);
937
- rb_define_method(cgsl_vector_complex, "radix2_backward!",
938
- rb_gsl_fft_complex_radix2_backward2, 0);
939
- rb_define_method(cgsl_vector_complex, "radix2_inverse!",
940
- rb_gsl_fft_complex_radix2_inverse2, 0);
941
- rb_define_method(cgsl_vector_complex, "radix2_dif_forward!",
942
- rb_gsl_fft_complex_radix2_dif_forward2, 0);
930
+ rb_gsl_fft_complex_radix2_transform2, 1);
931
+ rb_define_method(cgsl_vector_complex, "radix2_backward!",
932
+ rb_gsl_fft_complex_radix2_backward2, 0);
933
+ rb_define_method(cgsl_vector_complex, "radix2_inverse!",
934
+ rb_gsl_fft_complex_radix2_inverse2, 0);
935
+ rb_define_method(cgsl_vector_complex, "radix2_dif_forward!",
936
+ rb_gsl_fft_complex_radix2_dif_forward2, 0);
943
937
  rb_define_method(cgsl_vector_complex, "radix2_dif_transform!",
944
- rb_gsl_fft_complex_radix2_dif_transform2, 1);
945
- rb_define_method(cgsl_vector_complex, "radix2_dif_backward!",
946
- rb_gsl_fft_complex_radix2_dif_backward2, 0);
947
- rb_define_method(cgsl_vector_complex, "radix2_dif_inverse!",
948
- rb_gsl_fft_complex_radix2_dif_inverse2, 0);
938
+ rb_gsl_fft_complex_radix2_dif_transform2, 1);
939
+ rb_define_method(cgsl_vector_complex, "radix2_dif_backward!",
940
+ rb_gsl_fft_complex_radix2_dif_backward2, 0);
941
+ rb_define_method(cgsl_vector_complex, "radix2_dif_inverse!",
942
+ rb_gsl_fft_complex_radix2_dif_inverse2, 0);
949
943
 
950
944
  // class GSL::FFT::Wavetable < GSL::Object
951
945
  //
@@ -957,23 +951,23 @@ void Init_gsl_fft(VALUE module)
957
951
  // No alloc
958
952
  // TODO Make GSL::FFT::Wavetable#initialize private?
959
953
  rb_define_method(cgsl_fft_wavetable, "n",
960
- rb_GSL_FFT_Wavetable_n, 0);
954
+ rb_GSL_FFT_Wavetable_n, 0);
961
955
  rb_define_method(cgsl_fft_wavetable, "nf",
962
- rb_GSL_FFT_Wavetable_nf, 0);
956
+ rb_GSL_FFT_Wavetable_nf, 0);
963
957
  rb_define_method(cgsl_fft_wavetable, "factor",
964
- rb_GSL_FFT_Wavetable_factor, 0);
958
+ rb_GSL_FFT_Wavetable_factor, 0);
965
959
 
966
960
  // class GSL::FFT::ComplexWavetable < GSL::FFT::Wavetable
967
961
  cgsl_fft_complex_wavetable = rb_define_class_under(mgsl_fft, "ComplexWavetable",
968
- cgsl_fft_wavetable);
962
+ cgsl_fft_wavetable);
969
963
  rb_define_singleton_method(cgsl_fft_complex_wavetable, "alloc",
970
- rb_gsl_fft_complex_wavetable_new, 1);
964
+ rb_gsl_fft_complex_wavetable_new, 1);
971
965
 
972
966
  // class GSL::FFT::ComplexWorkspace < GSL::Object
973
- cgsl_fft_complex_workspace = rb_define_class_under(mgsl_fft, "ComplexWorkspace",
974
- cGSL_Object);
967
+ cgsl_fft_complex_workspace = rb_define_class_under(mgsl_fft, "ComplexWorkspace",
968
+ cGSL_Object);
975
969
  rb_define_singleton_method(cgsl_fft_complex_workspace, "alloc",
976
- rb_gsl_fft_complex_workspace_new, 1);
970
+ rb_gsl_fft_complex_workspace_new, 1);
977
971
 
978
972
  rb_define_method(cgsl_vector_complex, "forward", rb_gsl_fft_complex_forward, -1);
979
973
  rb_define_method(cgsl_vector_complex, "transform", rb_gsl_fft_complex_transform, -1);
@@ -988,58 +982,58 @@ void Init_gsl_fft(VALUE module)
988
982
  /*****/
989
983
 
990
984
  // TODO Do these method names need the "real_" and "halfcomplex_" prefixes?
991
- rb_define_method(cgsl_vector, "real_radix2_transform",
992
- rb_gsl_fft_real_radix2_transform, 0);
985
+ rb_define_method(cgsl_vector, "real_radix2_transform",
986
+ rb_gsl_fft_real_radix2_transform, 0);
993
987
  rb_define_alias(cgsl_vector, "radix2_transform", "real_radix2_transform");
994
988
  rb_define_alias(cgsl_vector, "radix2_forward", "real_radix2_transform");
995
- rb_define_method(cgsl_vector, "real_radix2_inverse",
996
- rb_gsl_fft_halfcomplex_radix2_inverse, 0);
989
+ rb_define_method(cgsl_vector, "real_radix2_inverse",
990
+ rb_gsl_fft_halfcomplex_radix2_inverse, 0);
997
991
  rb_define_alias(cgsl_vector, "radix2_inverse", "real_radix2_inverse");
998
- rb_define_alias(cgsl_vector, "halfcomplex_radix2_inverse",
999
- "real_radix2_inverse");
1000
- rb_define_method(cgsl_vector, "real_radix2_backward",
1001
- rb_gsl_fft_halfcomplex_radix2_backward, 0);
992
+ rb_define_alias(cgsl_vector, "halfcomplex_radix2_inverse",
993
+ "real_radix2_inverse");
994
+ rb_define_method(cgsl_vector, "real_radix2_backward",
995
+ rb_gsl_fft_halfcomplex_radix2_backward, 0);
1002
996
  rb_define_alias(cgsl_vector, "radix2_backward", "real_radix2_backward");
1003
- rb_define_alias(cgsl_vector, "halfcomplex_radix2_backward",
1004
- "real_radix2_backward");
997
+ rb_define_alias(cgsl_vector, "halfcomplex_radix2_backward",
998
+ "real_radix2_backward");
1005
999
 
1006
1000
  // TODO Do these method names need the "real_" and "halfcomplex_" prefixes?
1007
- rb_define_method(cgsl_vector, "real_radix2_transform!",
1008
- rb_gsl_fft_real_radix2_transform2, 0);
1001
+ rb_define_method(cgsl_vector, "real_radix2_transform!",
1002
+ rb_gsl_fft_real_radix2_transform2, 0);
1009
1003
  rb_define_alias(cgsl_vector, "radix2_transform!", "real_radix2_transform!");
1010
1004
  rb_define_alias(cgsl_vector, "radix2_forward!", "real_radix2_transform!");
1011
- rb_define_method(cgsl_vector, "real_radix2_inverse!",
1012
- rb_gsl_fft_halfcomplex_radix2_inverse2, 0);
1005
+ rb_define_method(cgsl_vector, "real_radix2_inverse!",
1006
+ rb_gsl_fft_halfcomplex_radix2_inverse2, 0);
1013
1007
  rb_define_alias(cgsl_vector, "radix2_inverse!", "real_radix2_inverse!");
1014
- rb_define_alias(cgsl_vector, "halfcomplex_radix2_inverse!",
1015
- "real_radix2_inverse!");
1016
- rb_define_method(cgsl_vector, "real_radix2_backward!",
1017
- rb_gsl_fft_halfcomplex_radix2_backward2, 0);
1008
+ rb_define_alias(cgsl_vector, "halfcomplex_radix2_inverse!",
1009
+ "real_radix2_inverse!");
1010
+ rb_define_method(cgsl_vector, "real_radix2_backward!",
1011
+ rb_gsl_fft_halfcomplex_radix2_backward2, 0);
1018
1012
  rb_define_alias(cgsl_vector, "radix2_backward!", "real_radix2_backward!");
1019
- rb_define_alias(cgsl_vector, "halfcomplex_radix2_backward!",
1020
- "real_radix2_backward!");
1013
+ rb_define_alias(cgsl_vector, "halfcomplex_radix2_backward!",
1014
+ "real_radix2_backward!");
1021
1015
 
1022
1016
  /*****/
1023
1017
 
1024
1018
  // class GSL::FFT::RealWavetable < GSL::FFT::Wavetable
1025
- cgsl_fft_real_wavetable = rb_define_class_under(mgsl_fft, "RealWavetable",
1026
- cgsl_fft_wavetable);
1019
+ cgsl_fft_real_wavetable = rb_define_class_under(mgsl_fft, "RealWavetable",
1020
+ cgsl_fft_wavetable);
1027
1021
  rb_define_singleton_method(cgsl_fft_real_wavetable, "alloc",
1028
- rb_gsl_fft_real_wavetable_new, 1);
1022
+ rb_gsl_fft_real_wavetable_new, 1);
1029
1023
 
1030
1024
  // class GSL::FFT::HalfComplexWavetable < GSL::FFT::Wavetable
1031
- cgsl_fft_halfcomplex_wavetable = rb_define_class_under(mgsl_fft,
1032
- "HalfComplexWavetable", cgsl_fft_wavetable);
1025
+ cgsl_fft_halfcomplex_wavetable = rb_define_class_under(mgsl_fft,
1026
+ "HalfComplexWavetable", cgsl_fft_wavetable);
1033
1027
  rb_define_singleton_method(cgsl_fft_halfcomplex_wavetable, "alloc",
1034
- rb_gsl_fft_halfcomplex_wavetable_new, 1);
1028
+ rb_gsl_fft_halfcomplex_wavetable_new, 1);
1035
1029
 
1036
1030
  /*****/
1037
1031
 
1038
1032
  // class GSL::FFT::RealWorkspace < GSL::Object
1039
- cgsl_fft_real_workspace = rb_define_class_under(mgsl_fft, "RealWorkspace",
1040
- cGSL_Object);
1033
+ cgsl_fft_real_workspace = rb_define_class_under(mgsl_fft, "RealWorkspace",
1034
+ cGSL_Object);
1041
1035
  rb_define_singleton_method(cgsl_fft_real_workspace, "alloc",
1042
- rb_gsl_fft_real_workspace_new, 1);
1036
+ rb_gsl_fft_real_workspace_new, 1);
1043
1037
 
1044
1038
  /*****/
1045
1039
 
@@ -1049,14 +1043,14 @@ void Init_gsl_fft(VALUE module)
1049
1043
  rb_define_alias(cgsl_vector, "forward", "real_transform");
1050
1044
  rb_define_alias(cgsl_vector, "fft_forward", "real_transform");
1051
1045
  rb_define_alias(cgsl_vector, "fft", "real_transform");
1052
- rb_define_method(cgsl_vector, "halfcomplex_transform",
1053
- rb_gsl_fft_halfcomplex_transform, -1);
1054
- rb_define_method(cgsl_vector, "halfcomplex_backward",
1055
- rb_gsl_fft_halfcomplex_backward, -1);
1046
+ rb_define_method(cgsl_vector, "halfcomplex_transform",
1047
+ rb_gsl_fft_halfcomplex_transform, -1);
1048
+ rb_define_method(cgsl_vector, "halfcomplex_backward",
1049
+ rb_gsl_fft_halfcomplex_backward, -1);
1056
1050
  rb_define_alias(cgsl_vector, "backward", "halfcomplex_backward");
1057
1051
  rb_define_alias(cgsl_vector, "fft_backward", "halfcomplex_backward");
1058
- rb_define_method(cgsl_vector, "halfcomplex_inverse",
1059
- rb_gsl_fft_halfcomplex_inverse, -1);
1052
+ rb_define_method(cgsl_vector, "halfcomplex_inverse",
1053
+ rb_gsl_fft_halfcomplex_inverse, -1);
1060
1054
  rb_define_alias(cgsl_vector, "fft_inverse", "halfcomplex_inverse");
1061
1055
  rb_define_alias(cgsl_vector, "ifft", "halfcomplex_inverse");
1062
1056
  rb_define_alias(cgsl_vector, "inverse", "halfcomplex_inverse");
@@ -1066,14 +1060,14 @@ void Init_gsl_fft(VALUE module)
1066
1060
  rb_define_alias(cgsl_vector, "forward!", "real_transform!");
1067
1061
  rb_define_alias(cgsl_vector, "fft_forward!", "real_transform!");
1068
1062
  rb_define_alias(cgsl_vector, "fft!", "real_transform!");
1069
- rb_define_method(cgsl_vector, "halfcomplex_transform!",
1070
- rb_gsl_fft_halfcomplex_transform2, -1);
1063
+ rb_define_method(cgsl_vector, "halfcomplex_transform!",
1064
+ rb_gsl_fft_halfcomplex_transform2, -1);
1071
1065
  rb_define_method(cgsl_vector, "halfcomplex_backward!",
1072
- rb_gsl_fft_halfcomplex_backward2, -1);
1066
+ rb_gsl_fft_halfcomplex_backward2, -1);
1073
1067
  rb_define_alias(cgsl_vector, "backward!", "halfcomplex_backward!");
1074
1068
  rb_define_alias(cgsl_vector, "fft_backward!", "halfcomplex_backward!");
1075
- rb_define_method(cgsl_vector, "halfcomplex_inverse!",
1076
- rb_gsl_fft_halfcomplex_inverse2, -1);
1069
+ rb_define_method(cgsl_vector, "halfcomplex_inverse!",
1070
+ rb_gsl_fft_halfcomplex_inverse2, -1);
1077
1071
  rb_define_alias(cgsl_vector, "fft_inverse!", "halfcomplex_inverse!");
1078
1072
  rb_define_alias(cgsl_vector, "ifft!", "halfcomplex_inverse!");
1079
1073
  rb_define_alias(cgsl_vector, "inverse!", "halfcomplex_inverse!");
@@ -1084,8 +1078,8 @@ void Init_gsl_fft(VALUE module)
1084
1078
  rb_define_alias(cgsl_vector, "real_to_complex", "fft_real_unpack");
1085
1079
  rb_define_alias(cgsl_vector, "r_to_c", "fft_real_unpack");
1086
1080
 
1087
- rb_define_method(cgsl_vector, "fft_halfcomplex_unpack",
1088
- rb_gsl_fft_halfcomplex_unpack, 0);
1081
+ rb_define_method(cgsl_vector, "fft_halfcomplex_unpack",
1082
+ rb_gsl_fft_halfcomplex_unpack, 0);
1089
1083
  rb_define_alias(cgsl_vector, "halfcomplex_unpack", "fft_halfcomplex_unpack");
1090
1084
  rb_define_alias(cgsl_vector, "halfcomplex_to_complex", "fft_halfcomplex_unpack");
1091
1085
  rb_define_alias(cgsl_vector, "hc_to_c", "fft_halfcomplex_unpack");
@@ -1093,9 +1087,9 @@ void Init_gsl_fft(VALUE module)
1093
1087
  /*****/
1094
1088
 
1095
1089
  rb_define_method(cgsl_vector, "to_nrc_order",
1096
- rb_gsl_fft_halfcomplex_to_nrc, 0);
1097
-
1090
+ rb_gsl_fft_halfcomplex_to_nrc, 0);
1091
+
1098
1092
  rb_define_method(cgsl_vector, "halfcomplex_amp_phase",
1099
- rb_gsl_fft_halfcomplex_amp_phase, 0);
1093
+ rb_gsl_fft_halfcomplex_amp_phase, 0);
1100
1094
  rb_define_alias(cgsl_vector, "hc_amp_phase", "halfcomplex_amp_phase");
1101
1095
  }