gsl 1.15.3 → 1.16.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.travis.yml +24 -0
  4. data/AUTHORS +10 -2
  5. data/COPYING +341 -339
  6. data/ChangeLog +612 -554
  7. data/Gemfile +4 -0
  8. data/README.md +77 -0
  9. data/Rakefile +14 -93
  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/{alf.c → gsl_native/alf.c} +10 -10
  89. data/ext/{array.c → gsl_native/array.c} +70 -159
  90. data/ext/{array_complex.c → gsl_native/array_complex.c} +63 -66
  91. data/ext/{blas.c → gsl_native/blas.c} +2 -3
  92. data/ext/{blas1.c → gsl_native/blas1.c} +35 -36
  93. data/ext/{blas2.c → gsl_native/blas2.c} +57 -62
  94. data/ext/{blas3.c → gsl_native/blas3.c} +57 -58
  95. data/ext/{block.c → gsl_native/block.c} +14 -18
  96. data/ext/{block_source.c → gsl_native/block_source.h} +110 -112
  97. data/ext/gsl_native/bspline.c +122 -0
  98. data/ext/{bundle.c → gsl_native/bundle.c} +0 -0
  99. data/ext/{cdf.c → gsl_native/cdf.c} +79 -93
  100. data/ext/{cheb.c → gsl_native/cheb.c} +78 -89
  101. data/ext/{combination.c → gsl_native/combination.c} +11 -19
  102. data/ext/{common.c → gsl_native/common.c} +9 -41
  103. data/ext/{complex.c → gsl_native/complex.c} +116 -118
  104. data/ext/gsl_native/const.c +331 -0
  105. data/ext/{const_additional.c → gsl_native/const_additional.c} +13 -34
  106. data/ext/gsl_native/cqp.c +283 -0
  107. data/ext/{deriv.c → gsl_native/deriv.c} +25 -33
  108. data/ext/{dht.c → gsl_native/dht.c} +23 -31
  109. data/ext/{diff.c → gsl_native/diff.c} +26 -28
  110. data/ext/{dirac.c → gsl_native/dirac.c} +45 -46
  111. data/ext/{eigen.c → gsl_native/eigen.c} +1044 -1095
  112. data/ext/{error.c → gsl_native/error.c} +18 -18
  113. data/ext/gsl_native/extconf.rb +118 -0
  114. data/ext/{fft.c → gsl_native/fft.c} +197 -204
  115. data/ext/{fit.c → gsl_native/fit.c} +17 -18
  116. data/ext/gsl_native/fresnel.c +312 -0
  117. data/ext/{function.c → gsl_native/function.c} +37 -43
  118. data/ext/{geometry.c → gsl_native/geometry.c} +16 -16
  119. data/ext/{graph.c → gsl_native/graph.c} +39 -89
  120. data/ext/{gsl.c → gsl_native/gsl.c} +12 -33
  121. data/ext/{gsl_narray.c → gsl_native/gsl_narray.c} +20 -30
  122. data/ext/{histogram.c → gsl_native/histogram.c} +133 -160
  123. data/ext/{histogram2d.c → gsl_native/histogram2d.c} +78 -104
  124. data/ext/{histogram3d.c → gsl_native/histogram3d.c} +76 -76
  125. data/ext/{histogram3d_source.c → gsl_native/histogram3d_source.c} +196 -197
  126. data/ext/{histogram_find.c → gsl_native/histogram_find.c} +32 -34
  127. data/ext/{histogram_oper.c → gsl_native/histogram_oper.c} +43 -52
  128. data/ext/{ieee.c → gsl_native/ieee.c} +9 -21
  129. data/{include → ext/gsl_native/include}/rb_gsl.h +4 -26
  130. data/{include → ext/gsl_native/include}/rb_gsl_array.h +15 -39
  131. data/{include → ext/gsl_native/include}/rb_gsl_cheb.h +0 -2
  132. data/{include → ext/gsl_native/include}/rb_gsl_common.h +61 -61
  133. data/{include → ext/gsl_native/include}/rb_gsl_complex.h +1 -1
  134. data/{include → ext/gsl_native/include}/rb_gsl_const.h +0 -6
  135. data/ext/gsl_native/include/rb_gsl_dirac.h +6 -0
  136. data/{include → ext/gsl_native/include}/rb_gsl_eigen.h +1 -1
  137. data/{include → ext/gsl_native/include}/rb_gsl_fft.h +0 -13
  138. data/{include → ext/gsl_native/include}/rb_gsl_fit.h +0 -2
  139. data/{include → ext/gsl_native/include}/rb_gsl_function.h +0 -4
  140. data/{include → ext/gsl_native/include}/rb_gsl_graph.h +2 -4
  141. data/{include → ext/gsl_native/include}/rb_gsl_histogram.h +8 -8
  142. data/{include → ext/gsl_native/include}/rb_gsl_histogram3d.h +50 -50
  143. data/{include → ext/gsl_native/include}/rb_gsl_integration.h +1 -1
  144. data/{include → ext/gsl_native/include}/rb_gsl_interp.h +0 -5
  145. data/{include → ext/gsl_native/include}/rb_gsl_linalg.h +2 -6
  146. data/{include → ext/gsl_native/include}/rb_gsl_math.h +0 -6
  147. data/{include → ext/gsl_native/include}/rb_gsl_odeiv.h +0 -3
  148. data/{include → ext/gsl_native/include}/rb_gsl_poly.h +3 -7
  149. data/{include → ext/gsl_native/include}/rb_gsl_rational.h +1 -8
  150. data/{include → ext/gsl_native/include}/rb_gsl_rng.h +0 -1
  151. data/{include → ext/gsl_native/include}/rb_gsl_root.h +1 -1
  152. data/{include → ext/gsl_native/include}/rb_gsl_sf.h +39 -48
  153. data/{include → ext/gsl_native/include}/rb_gsl_statistics.h +1 -1
  154. data/{include → ext/gsl_native/include}/rb_gsl_tensor.h +0 -2
  155. data/{include → ext/gsl_native/include}/rb_gsl_with_narray.h +3 -1
  156. data/{include → ext/gsl_native/include}/templates_off.h +0 -0
  157. data/{include → ext/gsl_native/include}/templates_on.h +1 -1
  158. data/ext/{integration.c → gsl_native/integration.c} +164 -189
  159. data/ext/{interp.c → gsl_native/interp.c} +25 -38
  160. data/ext/gsl_native/jacobi.c +733 -0
  161. data/ext/{linalg.c → gsl_native/linalg.c} +462 -589
  162. data/ext/{linalg_complex.c → gsl_native/linalg_complex.c} +93 -106
  163. data/ext/{math.c → gsl_native/math.c} +48 -67
  164. data/ext/{matrix.c → gsl_native/matrix.c} +13 -16
  165. data/ext/{matrix_complex.c → gsl_native/matrix_complex.c} +119 -123
  166. data/ext/{matrix_double.c → gsl_native/matrix_double.c} +79 -82
  167. data/ext/{matrix_int.c → gsl_native/matrix_int.c} +53 -54
  168. data/ext/{matrix_source.c → gsl_native/matrix_source.h} +292 -318
  169. data/ext/{min.c → gsl_native/min.c} +45 -76
  170. data/ext/{monte.c → gsl_native/monte.c} +50 -64
  171. data/ext/{multifit.c → gsl_native/multifit.c} +142 -151
  172. data/ext/{multimin.c → gsl_native/multimin.c} +64 -92
  173. data/ext/{multimin_fsdf.c → gsl_native/multimin_fsdf.c} +16 -16
  174. data/ext/{multiroots.c → gsl_native/multiroots.c} +73 -76
  175. data/ext/{multiset.c → gsl_native/multiset.c} +4 -8
  176. data/ext/{ndlinear.c → gsl_native/ndlinear.c} +320 -321
  177. data/ext/{nmf.c → gsl_native/nmf.c} +11 -11
  178. data/ext/{nmf_wrap.c → gsl_native/nmf_wrap.c} +1 -1
  179. data/ext/{ntuple.c → gsl_native/ntuple.c} +23 -23
  180. data/ext/{odeiv.c → gsl_native/odeiv.c} +101 -116
  181. data/ext/gsl_native/ool.c +879 -0
  182. data/ext/{permutation.c → gsl_native/permutation.c} +39 -37
  183. data/ext/{poly.c → gsl_native/poly.c} +10 -13
  184. data/ext/{poly2.c → gsl_native/poly2.c} +16 -16
  185. data/ext/{poly_source.c → gsl_native/poly_source.h} +249 -293
  186. data/ext/{qrng.c → gsl_native/qrng.c} +9 -20
  187. data/ext/{randist.c → gsl_native/randist.c} +222 -247
  188. data/ext/{rational.c → gsl_native/rational.c} +12 -12
  189. data/ext/{rng.c → gsl_native/rng.c} +30 -47
  190. data/ext/{root.c → gsl_native/root.c} +47 -48
  191. data/ext/{sf.c → gsl_native/sf.c} +196 -244
  192. data/ext/{sf_airy.c → gsl_native/sf_airy.c} +2 -2
  193. data/ext/{sf_bessel.c → gsl_native/sf_bessel.c} +7 -7
  194. data/ext/{sf_clausen.c → gsl_native/sf_clausen.c} +1 -1
  195. data/ext/{sf_coulomb.c → gsl_native/sf_coulomb.c} +40 -40
  196. data/ext/{sf_coupling.c → gsl_native/sf_coupling.c} +30 -30
  197. data/ext/{sf_dawson.c → gsl_native/sf_dawson.c} +1 -1
  198. data/ext/{sf_debye.c → gsl_native/sf_debye.c} +1 -10
  199. data/ext/{sf_dilog.c → gsl_native/sf_dilog.c} +1 -1
  200. data/ext/{sf_elementary.c → gsl_native/sf_elementary.c} +3 -3
  201. data/ext/{sf_ellint.c → gsl_native/sf_ellint.c} +43 -43
  202. data/ext/{sf_elljac.c → gsl_native/sf_elljac.c} +3 -3
  203. data/ext/{sf_erfc.c → gsl_native/sf_erfc.c} +1 -5
  204. data/ext/{sf_exp.c → gsl_native/sf_exp.c} +3 -3
  205. data/ext/{sf_expint.c → gsl_native/sf_expint.c} +2 -12
  206. data/ext/{sf_fermi_dirac.c → gsl_native/sf_fermi_dirac.c} +1 -1
  207. data/ext/{sf_gamma.c → gsl_native/sf_gamma.c} +2 -6
  208. data/ext/{sf_gegenbauer.c → gsl_native/sf_gegenbauer.c} +1 -1
  209. data/ext/{sf_hyperg.c → gsl_native/sf_hyperg.c} +1 -1
  210. data/ext/{sf_laguerre.c → gsl_native/sf_laguerre.c} +4 -4
  211. data/ext/{sf_lambert.c → gsl_native/sf_lambert.c} +1 -1
  212. data/ext/{sf_legendre.c → gsl_native/sf_legendre.c} +1 -1
  213. data/ext/{sf_log.c → gsl_native/sf_log.c} +4 -4
  214. data/ext/gsl_native/sf_mathieu.c +235 -0
  215. data/ext/{sf_power.c → gsl_native/sf_power.c} +1 -1
  216. data/ext/{sf_psi.c → gsl_native/sf_psi.c} +3 -12
  217. data/ext/{sf_synchrotron.c → gsl_native/sf_synchrotron.c} +1 -1
  218. data/ext/{sf_transport.c → gsl_native/sf_transport.c} +1 -1
  219. data/ext/{sf_trigonometric.c → gsl_native/sf_trigonometric.c} +4 -4
  220. data/ext/{sf_zeta.c → gsl_native/sf_zeta.c} +1 -5
  221. data/ext/{signal.c → gsl_native/signal.c} +63 -68
  222. data/ext/{siman.c → gsl_native/siman.c} +45 -49
  223. data/ext/{sort.c → gsl_native/sort.c} +6 -7
  224. data/ext/{spline.c → gsl_native/spline.c} +28 -46
  225. data/ext/{stats.c → gsl_native/stats.c} +105 -118
  226. data/ext/{sum.c → gsl_native/sum.c} +34 -34
  227. data/ext/{tamu_anova.c → gsl_native/tamu_anova.c} +1 -1
  228. data/ext/{tensor.c → gsl_native/tensor.c} +8 -11
  229. data/ext/{tensor_source.c → gsl_native/tensor_source.h} +147 -148
  230. data/ext/{vector.c → gsl_native/vector.c} +11 -14
  231. data/ext/{vector_complex.c → gsl_native/vector_complex.c} +179 -184
  232. data/ext/{vector_double.c → gsl_native/vector_double.c} +178 -183
  233. data/ext/{vector_int.c → gsl_native/vector_int.c} +27 -29
  234. data/ext/{vector_source.c → gsl_native/vector_source.h} +428 -443
  235. data/ext/{wavelet.c → gsl_native/wavelet.c} +224 -246
  236. data/gsl.gemspec +29 -0
  237. data/lib/gsl.rb +8 -3
  238. data/lib/gsl/gnuplot.rb +3 -3
  239. data/lib/gsl/oper.rb +35 -60
  240. data/lib/gsl/version.rb +3 -0
  241. data/lib/rbgsl.rb +1 -3
  242. data/rdoc/alf.rdoc +5 -5
  243. data/rdoc/blas.rdoc +9 -9
  244. data/rdoc/bspline.rdoc +17 -17
  245. data/rdoc/changes.rdoc +4 -9
  246. data/rdoc/cheb.rdoc +25 -25
  247. data/rdoc/cholesky_complex.rdoc +21 -21
  248. data/rdoc/combi.rdoc +37 -37
  249. data/rdoc/complex.rdoc +22 -22
  250. data/rdoc/const.rdoc +47 -47
  251. data/rdoc/dht.rdoc +49 -49
  252. data/rdoc/diff.rdoc +42 -42
  253. data/rdoc/ehandling.rdoc +6 -6
  254. data/rdoc/eigen.rdoc +153 -153
  255. data/rdoc/fft.rdoc +146 -146
  256. data/rdoc/fit.rdoc +109 -109
  257. data/rdoc/function.rdoc +11 -11
  258. data/rdoc/graph.rdoc +17 -17
  259. data/rdoc/hist.rdoc +103 -103
  260. data/rdoc/hist2d.rdoc +42 -42
  261. data/rdoc/hist3d.rdoc +9 -9
  262. data/rdoc/integration.rdoc +110 -110
  263. data/rdoc/interp.rdoc +71 -71
  264. data/rdoc/intro.rdoc +8 -8
  265. data/rdoc/linalg.rdoc +188 -188
  266. data/rdoc/linalg_complex.rdoc +1 -1
  267. data/rdoc/math.rdoc +58 -58
  268. data/rdoc/matrix.rdoc +275 -275
  269. data/rdoc/min.rdoc +57 -57
  270. data/rdoc/monte.rdoc +22 -22
  271. data/rdoc/multimin.rdoc +95 -95
  272. data/rdoc/multiroot.rdoc +80 -80
  273. data/rdoc/narray.rdoc +32 -32
  274. data/rdoc/ndlinear.rdoc +54 -54
  275. data/rdoc/nonlinearfit.rdoc +100 -100
  276. data/rdoc/ntuple.rdoc +31 -31
  277. data/rdoc/odeiv.rdoc +88 -88
  278. data/rdoc/perm.rdoc +90 -90
  279. data/rdoc/poly.rdoc +66 -66
  280. data/rdoc/qrng.rdoc +21 -21
  281. data/rdoc/randist.rdoc +82 -82
  282. data/rdoc/ref.rdoc +57 -57
  283. data/rdoc/rng.rdoc +85 -85
  284. data/rdoc/roots.rdoc +57 -57
  285. data/rdoc/sf.rdoc +428 -428
  286. data/rdoc/siman.rdoc +19 -19
  287. data/rdoc/sort.rdoc +30 -30
  288. data/rdoc/start.rdoc +8 -8
  289. data/rdoc/stats.rdoc +52 -52
  290. data/rdoc/sum.rdoc +12 -12
  291. data/rdoc/tensor.rdoc +31 -31
  292. data/rdoc/tut.rdoc +1 -1
  293. data/rdoc/use.rdoc +39 -39
  294. data/rdoc/vector.rdoc +188 -188
  295. data/rdoc/vector_complex.rdoc +24 -24
  296. data/rdoc/wavelet.rdoc +46 -46
  297. data/test/gsl/blas_test.rb +79 -0
  298. data/test/gsl/bspline_test.rb +63 -0
  299. data/test/gsl/cdf_test.rb +1512 -0
  300. data/test/gsl/cheb_test.rb +80 -0
  301. data/test/gsl/combination_test.rb +100 -0
  302. data/test/gsl/complex_test.rb +20 -0
  303. data/test/gsl/const_test.rb +29 -0
  304. data/test/gsl/deriv_test.rb +62 -0
  305. data/test/gsl/dht_test.rb +79 -0
  306. data/test/gsl/diff_test.rb +53 -0
  307. data/test/gsl/eigen_test.rb +563 -0
  308. data/test/gsl/err_test.rb +23 -0
  309. data/test/gsl/fit_test.rb +101 -0
  310. data/test/gsl/histo_test.rb +14 -0
  311. data/test/gsl/index_test.rb +61 -0
  312. data/test/gsl/integration_test.rb +274 -0
  313. data/test/gsl/interp_test.rb +27 -0
  314. data/test/gsl/linalg_test.rb +463 -0
  315. data/test/gsl/matrix_nmf_test.rb +37 -0
  316. data/test/gsl/matrix_test.rb +98 -0
  317. data/test/gsl/min_test.rb +89 -0
  318. data/test/gsl/monte_test.rb +77 -0
  319. data/test/gsl/multifit_test.rb +753 -0
  320. data/test/gsl/multimin_test.rb +157 -0
  321. data/test/gsl/multiroot_test.rb +135 -0
  322. data/test/gsl/multiset_test.rb +52 -0
  323. data/test/gsl/odeiv_test.rb +275 -0
  324. data/test/gsl/oper_test.rb +98 -0
  325. data/test/gsl/poly_test.rb +338 -0
  326. data/test/gsl/qrng_test.rb +94 -0
  327. data/test/gsl/quartic_test.rb +28 -0
  328. data/test/gsl/randist_test.rb +122 -0
  329. data/test/gsl/rng_test.rb +303 -0
  330. data/test/gsl/roots_test.rb +78 -0
  331. data/test/gsl/sf_test.rb +2079 -0
  332. data/test/gsl/stats_test.rb +122 -0
  333. data/test/gsl/sum_test.rb +69 -0
  334. data/test/gsl/tensor_test.rb +396 -0
  335. data/test/gsl/vector_test.rb +223 -0
  336. data/test/gsl/wavelet_test.rb +130 -0
  337. data/test/gsl_test.rb +321 -0
  338. data/test/test_helper.rb +42 -0
  339. data/uncrustify.cfg +1693 -0
  340. metadata +337 -378
  341. data/README +0 -32
  342. data/VERSION +0 -1
  343. data/ext/bspline.c +0 -130
  344. data/ext/const.c +0 -673
  345. data/ext/cqp.c +0 -283
  346. data/ext/extconf.rb +0 -295
  347. data/ext/fcmp.c +0 -66
  348. data/ext/fresnel.c +0 -312
  349. data/ext/jacobi.c +0 -739
  350. data/ext/ool.c +0 -879
  351. data/ext/oper_complex_source.c +0 -253
  352. data/ext/sf_mathieu.c +0 -238
  353. data/include/rb_gsl_config.h +0 -62
  354. data/include/rb_gsl_dirac.h +0 -13
  355. data/rdoc/index.rdoc +0 -62
  356. data/rdoc/rngextra.rdoc +0 -11
  357. data/rdoc/screenshot.rdoc +0 -40
  358. data/setup.rb +0 -1585
  359. data/tests/blas/amax.rb +0 -14
  360. data/tests/blas/asum.rb +0 -16
  361. data/tests/blas/axpy.rb +0 -25
  362. data/tests/blas/copy.rb +0 -23
  363. data/tests/blas/dot.rb +0 -23
  364. data/tests/bspline.rb +0 -53
  365. data/tests/cdf.rb +0 -1388
  366. data/tests/cheb.rb +0 -112
  367. data/tests/combination.rb +0 -123
  368. data/tests/complex.rb +0 -17
  369. data/tests/const.rb +0 -24
  370. data/tests/deriv.rb +0 -85
  371. data/tests/dht/dht1.rb +0 -17
  372. data/tests/dht/dht2.rb +0 -23
  373. data/tests/dht/dht3.rb +0 -23
  374. data/tests/dht/dht4.rb +0 -23
  375. data/tests/diff.rb +0 -78
  376. data/tests/eigen/eigen.rb +0 -220
  377. data/tests/eigen/gen.rb +0 -105
  378. data/tests/eigen/genherm.rb +0 -66
  379. data/tests/eigen/gensymm.rb +0 -68
  380. data/tests/eigen/nonsymm.rb +0 -53
  381. data/tests/eigen/nonsymmv.rb +0 -53
  382. data/tests/eigen/symm-herm.rb +0 -74
  383. data/tests/err.rb +0 -58
  384. data/tests/fit.rb +0 -124
  385. data/tests/gsl_test.rb +0 -118
  386. data/tests/gsl_test2.rb +0 -110
  387. data/tests/histo.rb +0 -12
  388. data/tests/integration/integration1.rb +0 -72
  389. data/tests/integration/integration2.rb +0 -71
  390. data/tests/integration/integration3.rb +0 -71
  391. data/tests/integration/integration4.rb +0 -71
  392. data/tests/interp.rb +0 -45
  393. data/tests/linalg/HH.rb +0 -64
  394. data/tests/linalg/LU.rb +0 -47
  395. data/tests/linalg/QR.rb +0 -77
  396. data/tests/linalg/SV.rb +0 -24
  397. data/tests/linalg/TDN.rb +0 -116
  398. data/tests/linalg/TDS.rb +0 -122
  399. data/tests/linalg/bidiag.rb +0 -73
  400. data/tests/linalg/cholesky.rb +0 -20
  401. data/tests/linalg/linalg.rb +0 -158
  402. data/tests/matrix/matrix_complex_test.rb +0 -36
  403. data/tests/matrix/matrix_nmf_test.rb +0 -39
  404. data/tests/matrix/matrix_test.rb +0 -48
  405. data/tests/min.rb +0 -99
  406. data/tests/monte/miser.rb +0 -31
  407. data/tests/monte/vegas.rb +0 -45
  408. data/tests/multifit/test_2dgauss.rb +0 -112
  409. data/tests/multifit/test_brown.rb +0 -90
  410. data/tests/multifit/test_enso.rb +0 -246
  411. data/tests/multifit/test_filip.rb +0 -155
  412. data/tests/multifit/test_gauss.rb +0 -97
  413. data/tests/multifit/test_longley.rb +0 -110
  414. data/tests/multifit/test_multifit.rb +0 -52
  415. data/tests/multimin.rb +0 -139
  416. data/tests/multiroot.rb +0 -131
  417. data/tests/multiset.rb +0 -52
  418. data/tests/narray/blas_dnrm2.rb +0 -20
  419. data/tests/odeiv.rb +0 -353
  420. data/tests/poly/poly.rb +0 -290
  421. data/tests/poly/special.rb +0 -65
  422. data/tests/qrng.rb +0 -131
  423. data/tests/quartic.rb +0 -29
  424. data/tests/randist.rb +0 -134
  425. data/tests/rng.rb +0 -305
  426. data/tests/roots.rb +0 -76
  427. data/tests/run-test.sh +0 -17
  428. data/tests/sf/gsl_test_sf.rb +0 -249
  429. data/tests/sf/test_airy.rb +0 -83
  430. data/tests/sf/test_bessel.rb +0 -306
  431. data/tests/sf/test_coulomb.rb +0 -17
  432. data/tests/sf/test_dilog.rb +0 -25
  433. data/tests/sf/test_gamma.rb +0 -209
  434. data/tests/sf/test_hyperg.rb +0 -356
  435. data/tests/sf/test_legendre.rb +0 -227
  436. data/tests/sf/test_mathieu.rb +0 -59
  437. data/tests/sf/test_mode.rb +0 -19
  438. data/tests/sf/test_sf.rb +0 -839
  439. data/tests/stats.rb +0 -174
  440. data/tests/stats_mt.rb +0 -16
  441. data/tests/sum.rb +0 -98
  442. data/tests/sys.rb +0 -323
  443. data/tests/tensor.rb +0 -419
  444. data/tests/vector/vector_complex_test.rb +0 -101
  445. data/tests/vector/vector_test.rb +0 -141
  446. data/tests/wavelet.rb +0 -142
data/ext/fcmp.c DELETED
@@ -1,66 +0,0 @@
1
- /* sys/gsl_compare.c
2
- *
3
- * Copyright (C) 2002 Gert Van den Eynde
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 2 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., 675 Mass Ave, Cambridge, MA 02139, USA.
18
- *
19
- * Based on fcmp 1.2.2 Copyright (c) 1998-2000 Theodore C. Belding
20
- * University of Michigan Center for the Study of Complex Systems
21
- * Ted.Belding@umich.edu
22
- *
23
- */
24
-
25
- #include "rb_gsl_config.h"
26
-
27
- #ifndef GSL_1_3_LATER
28
-
29
- #include <config.h>
30
- #include <gsl/gsl_sys.h>
31
- #include <math.h>
32
-
33
- int gsl_fcmp(const double x1, const double x2, const double epsilon)
34
- {
35
- int exponent;
36
- double delta, difference;
37
-
38
- /* Find exponent of largest absolute value */
39
-
40
- {
41
- double max = (fabs (x1) > fabs (x2)) ? x1 : x2;
42
-
43
- frexp (max, &exponent);
44
- }
45
-
46
- /* Form a neighborhood of size 2 * delta */
47
-
48
- delta = ldexp (epsilon, exponent);
49
-
50
- difference = x1 - x2;
51
-
52
- if (difference > delta) /* x1 > x2 */
53
- {
54
- return 1;
55
- }
56
- else if (difference < -delta) /* x1 < x2 */
57
- {
58
- return -1;
59
- }
60
- else /* -delta <= difference <= delta */
61
- {
62
- return 0; /* x1 ~=~ x2 */
63
- }
64
- }
65
-
66
- #endif
@@ -1,312 +0,0 @@
1
- /****************************************************************************
2
- * fresnel.c -
3
- * Calculation of Fresnel integrals by expansion to Chebyshev series
4
- * Expansions are taken from the book
5
- * Y.L. Luke. Mathematical functions and their approximations.
6
- * Moscow, "Mir", 1980. PP. 145-149 (Russian edition)
7
- ****************************************************************************
8
- */
9
- /*
10
- Modified for Ruby bindings
11
- 2006/Dec/24 Y. TSUNESADA
12
- */
13
- #include <math.h>
14
- #include "rb_gsl.h"
15
- #include "rb_gsl_sf.h"
16
-
17
- static const double sqrt_pi_2 = 1.2533141373155002512078826424; /* sqrt(pi/2) */
18
- static const double sqrt_2_pi = 0.7978845608028653558798921199; /* sqrt(2/pi) */
19
- static const double _1_sqrt_2pi = 0.3989422804014326779399460599; /* 1/sqrt(2*pi) */
20
- static const double pi_2 = 1.5707963267948966192313216916; /* pi/2 */
21
-
22
- static double f_data_a[18] =
23
- {
24
- 0.76435138664186000189,
25
- -0.43135547547660179313,
26
- 0.43288199979726653054,
27
- -0.26973310338387111029,
28
- 0.08416045320876935378,
29
- -0.01546524484461381958,
30
- 0.00187855423439822018,
31
- -0.00016264977618887547,
32
- 0.00001057397656383260,
33
- -0.00000053609339889243,
34
- 0.00000002181658454933,
35
- -0.00000000072901621186,
36
- 0.00000000002037332546,
37
- -0.00000000000048344033,
38
- 0.00000000000000986533,
39
- -0.00000000000000017502,
40
- 0.00000000000000000272,
41
- -0.00000000000000000004
42
- };
43
-
44
- static double f_data_b[17] =
45
- {
46
- 0.63041404314570539241,
47
- -0.42344511405705333544,
48
- 0.37617172643343656625,
49
- -0.16249489154509567415,
50
- 0.03822255778633008694,
51
- -0.00564563477132190899,
52
- 0.00057454951976897367,
53
- -0.00004287071532102004,
54
- 0.00000245120749923299,
55
- -0.00000011098841840868,
56
- 0.00000000408249731696,
57
- -0.00000000012449830219,
58
- 0.00000000000320048425,
59
- -0.00000000000007032416,
60
- 0.00000000000000133638,
61
- -0.00000000000000002219,
62
- 0.00000000000000000032
63
- };
64
-
65
- static double fresnel_cos_0_8(double x)
66
- {
67
- double x_8 = x/8.0;
68
- double xx = 2.0*x_8*x_8 - 1.0;
69
-
70
- double t0 = 1.0;
71
- double t1 = xx;
72
- double sumC = f_data_a[0] + f_data_a[1]*t1;
73
- double t2;
74
- int n;
75
- for (n=2; n < 18; n++)
76
- {
77
- t2 = 2.0*xx*t1 - t0;
78
- sumC += f_data_a[n]*t2;
79
- t0 = t1; t1 = t2;
80
- }
81
- return _1_sqrt_2pi*sqrt(x)*sumC;
82
- }
83
-
84
- static double fresnel_sin_0_8(double x)
85
- {
86
- double x_8 = x/8.0;
87
- double xx = 2.0*x_8*x_8 - 1.0;
88
- double t0 = 1.;
89
- double t1 = xx;
90
- double ot1 = x_8;
91
- double ot2 = 2.0*x_8*t1 - ot1;
92
- double sumS = f_data_b[0]*ot1 + f_data_b[1]*ot2;
93
- int n;
94
- double t2;
95
- for (n=2; n < 17; n++)
96
- {
97
- t2 = 2.0*xx*t1 - t0;
98
- ot1 = ot2;
99
- ot2 = 2.0*x_8*t2 - ot1;
100
- sumS += f_data_b[n]*ot2;
101
- t0 = t1; t1 = t2;
102
- }
103
- return _1_sqrt_2pi*sqrt(x)*sumS;
104
- }
105
-
106
- static double f_data_e[41] =
107
- {
108
- 0.97462779093296822410,
109
- -0.02424701873969321371,
110
- 0.00103400906842977317,
111
- -0.00008052450246908016,
112
- 0.00000905962481966582,
113
- -0.00000131016996757743,
114
- 0.00000022770820391497,
115
- -0.00000004558623552026,
116
- 0.00000001021567537083,
117
- -0.00000000251114508133,
118
- 0.00000000066704761275,
119
- -0.00000000018931512852,
120
- 0.00000000005689898935,
121
- -0.00000000001798219359,
122
- 0.00000000000594162963,
123
- -0.00000000000204285065,
124
- 0.00000000000072797580,
125
- -0.00000000000026797428,
126
- 0.00000000000010160694,
127
- -0.00000000000003958559,
128
- 0.00000000000001581262,
129
- -0.00000000000000646411,
130
- 0.00000000000000269981,
131
- -0.00000000000000115038,
132
- 0.00000000000000049942,
133
- -0.00000000000000022064,
134
- 0.00000000000000009910,
135
- -0.00000000000000004520,
136
- 0.00000000000000002092,
137
- -0.00000000000000000982,
138
- 0.00000000000000000467,
139
- -0.00000000000000000225,
140
- 0.00000000000000000110,
141
- -0.00000000000000000054,
142
- 0.00000000000000000027,
143
- -0.00000000000000000014,
144
- 0.00000000000000000007,
145
- -0.00000000000000000004,
146
- 0.00000000000000000002,
147
- -0.00000000000000000001,
148
- 0.00000000000000000001
149
- };
150
-
151
- static double f_data_f[35] =
152
- {
153
- 0.99461545179407928910,
154
- -0.00524276766084297210,
155
- 0.00013325864229883909,
156
- -0.00000770856452642713,
157
- 0.00000070848077032045,
158
- -0.00000008812517411602,
159
- 0.00000001359784717148,
160
- -0.00000000246858295747,
161
- 0.00000000050925789921,
162
- -0.00000000011653400634,
163
- 0.00000000002906578309,
164
- -0.00000000000779847361,
165
- 0.00000000000222802542,
166
- -0.00000000000067239338,
167
- 0.00000000000021296411,
168
- -0.00000000000007041482,
169
- 0.00000000000002419805,
170
- -0.00000000000000861080,
171
- 0.00000000000000316287,
172
- -0.00000000000000119596,
173
- 0.00000000000000046444,
174
- -0.00000000000000018485,
175
- 0.00000000000000007527,
176
- -0.00000000000000003131,
177
- 0.00000000000000001328,
178
- -0.00000000000000000574,
179
- 0.00000000000000000252,
180
- -0.00000000000000000113,
181
- 0.00000000000000000051,
182
- -0.00000000000000000024,
183
- 0.00000000000000000011,
184
- -0.00000000000000000005,
185
- 0.00000000000000000002,
186
- -0.00000000000000000001,
187
- 0.00000000000000000001
188
- };
189
-
190
- static double fresnel_cos_8_inf(double x)
191
- {
192
- double xx = 128.0/(x*x) - 1.0; /* 2.0*(8/x)^2 - 1 */
193
- double t0 = 1.0;
194
- double t1 = xx;
195
- double sumP = f_data_e[0] + f_data_e[1]*t1;
196
- double sumQ = f_data_f[0] + f_data_f[1]*t1;
197
- double t2;
198
- int n;
199
- for(n = 2; n < 35; n++)
200
- {
201
- t2 = 2.0*xx*t1 - t0;
202
- sumP += f_data_e[n]*t2; /* sumP += f_data_e[n]*ChebyshevT(n,xx) */
203
- sumQ += f_data_f[n]*t2; /* sumQ += f_data_f[n]*ChebyshevT(n,xx) */
204
- t0 = t1; t1 = t2;
205
- }
206
- for(n = 35; n < 41; n++)
207
- {
208
- t2 = 2.0*xx*t1 - t0;
209
- sumP += f_data_e[n]*t2; /* sumP += f_data_e[n]*ChebyshevT(n,xx) */
210
- t0 = t1; t1 = t2;
211
- }
212
- return 0.5 - _1_sqrt_2pi*(0.5*sumP*cos(x)/x - sumQ*sin(x))/sqrt(x);
213
- }
214
-
215
- static double fresnel_sin_8_inf(double x)
216
- {
217
- double xx = 128.0/(x*x) - 1.0; /* 2.0*(8/x)^2 - 1 */
218
- double t0 = 1.0;
219
- double t1 = xx;
220
- double sumP = f_data_e[0] + f_data_e[1]*t1;
221
- double sumQ = f_data_f[0] + f_data_f[1]*t1;
222
- double t2;
223
- int n;
224
- for(n = 2; n < 35; n++)
225
- {
226
- t2 = 2.0*xx*t1 - t0;
227
- sumP += f_data_e[n]*t2; /* sumP += f_data_e[n]*ChebyshevT(n,xx) */
228
- sumQ += f_data_f[n]*t2; /* sumQ += f_data_f[n]*ChebyshevT(n,xx) */
229
- t0 = t1; t1 = t2;
230
- }
231
- for(n = 35; n < 41; n++)
232
- {
233
- t2 = 2.0*xx*t1 - t0;
234
- sumP += f_data_e[n]*t2; /* sumQ += f_data_f[n]*ChebyshevT(n,xx) */
235
- t0 = t1; t1 = t2;
236
- }
237
- return 0.5 - _1_sqrt_2pi*(0.5*sumP*sin(x)/x + sumQ*cos(x))/sqrt(x);
238
- }
239
-
240
-
241
- double fresnel_c(double x)
242
- {
243
- double xx = x*x*pi_2;
244
- double ret_val;
245
- if(xx<=8.0)
246
- ret_val = fresnel_cos_0_8(xx);
247
- else
248
- ret_val = fresnel_cos_8_inf(xx);
249
- return (x<0.0) ? -ret_val : ret_val;
250
- }
251
-
252
- double fresnel_s(double x)
253
- {
254
- double xx = x*x*pi_2;
255
- double ret_val;
256
- if(xx<=8.0)
257
- ret_val = fresnel_sin_0_8(xx);
258
- else
259
- ret_val = fresnel_sin_8_inf(xx);
260
- return (x<0.0) ? -ret_val : ret_val;
261
- }
262
-
263
- double fresnel_c1(double x)
264
- {
265
- return fresnel_c(x*sqrt_2_pi);
266
- }
267
-
268
- double fresnel_s1(double x)
269
- {
270
- return fresnel_s(x*sqrt_2_pi);
271
- }
272
-
273
- static VALUE rb_fresnel_c(VALUE obj, VALUE x)
274
- {
275
- return rb_gsl_sf_eval1(fresnel_c, x);
276
- }
277
- static VALUE rb_fresnel_s(VALUE obj, VALUE x)
278
- {
279
- return rb_gsl_sf_eval1(fresnel_s, x);
280
- }
281
- static VALUE rb_fresnel_c1(VALUE obj, VALUE x)
282
- {
283
- return rb_gsl_sf_eval1(fresnel_c1, x);
284
- }
285
- static VALUE rb_fresnel_s1(VALUE obj, VALUE x)
286
- {
287
- return rb_gsl_sf_eval1(fresnel_s1, x);
288
- }
289
- void Init_fresnel(VALUE module)
290
- {
291
- VALUE mfresnel;
292
- mfresnel = rb_define_module_under(module, "Fresnel");
293
- rb_define_module_function(module, "fresnel_c", rb_fresnel_c, 1);
294
- rb_define_module_function(module, "fresnel_s", rb_fresnel_s, 1);
295
- rb_define_module_function(module, "fresnel_c1", rb_fresnel_c1, 1);
296
- rb_define_module_function(module, "fresnel_s1", rb_fresnel_s1, 1);
297
- rb_define_module_function(mfresnel, "c", rb_fresnel_c, 1);
298
- rb_define_module_function(mfresnel, "s", rb_fresnel_s, 1);
299
- rb_define_module_function(mfresnel, "c1", rb_fresnel_c1, 1);
300
- rb_define_module_function(mfresnel, "s1", rb_fresnel_s1, 1);
301
- }
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
@@ -1,739 +0,0 @@
1
- #ifdef HAVE_JACOBI_H
2
- #include "rb_gsl.h"
3
- #include "jacobi.h"
4
-
5
- static VALUE jac_eval3_e(VALUE x, VALUE a, VALUE b,
6
- int (*f)(double, double, double, gsl_sf_result*))
7
- {
8
- gsl_sf_result *result;
9
- VALUE obj;
10
- obj = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, result);
11
- (*f)(NUM2DBL(x), NUM2DBL(a), NUM2DBL(b), result);
12
- return obj;
13
- }
14
-
15
- static VALUE jac_eval3(VALUE xx, VALUE aa, VALUE bb, double (*f)(double, double, double))
16
- {
17
- gsl_vector *x, *y;
18
- double a, b;
19
- size_t i, len;
20
- VALUE ary;
21
- #ifdef HAVE_NARRAY_H
22
- double *ptr1, *ptr2;
23
- struct NARRAY *na;
24
- #endif
25
- a = NUM2DBL(aa);
26
- b = NUM2DBL(bb);
27
- if (VECTOR_P(xx)) {
28
- Data_Get_Struct(xx, gsl_vector, x);
29
- y = gsl_vector_alloc(x->size);
30
- for (i = 0; i < x->size; i++) {
31
- gsl_vector_set(y, i, (*f)(gsl_vector_get(x, i), a, b));
32
- }
33
- return Data_Wrap_Struct(VECTOR_ROW_COL(CLASS_OF(xx)), 0, gsl_vector_free, y);
34
- } else if (TYPE(xx) == T_ARRAY) {
35
- // len = RARRAY(xx)->len;
36
- len = RARRAY_LEN(xx);
37
- ary = rb_ary_new2(len);
38
- for (i = 0; i < len; i++) {
39
- rb_ary_store(ary, i, rb_float_new((*f)(NUM2DBL(rb_ary_entry(xx, i)), a, b)));
40
- }
41
- return ary;
42
- #ifdef HAVE_NARRAY_H
43
- } else if (NA_IsNArray(xx)) {
44
- GetNArray(xx, na);
45
- len = na->total;
46
- ptr1 = (double*) na->ptr;
47
- ary = na_make_object(NA_DFLOAT, na->rank, na->shape, CLASS_OF(xx));
48
- ptr2 = NA_PTR_TYPE(ary, double*);
49
- for (i = 0; i < len; i++) {
50
- ptr2[i] = (*f)(ptr1[i], a, b);
51
- }
52
- return ary;
53
- #endif
54
- } else {
55
- return rb_float_new((*f)(NUM2DBL(xx), a, b));
56
- }
57
- }
58
-
59
- static VALUE rb_jac_jacobi_eval(int argc, VALUE *argv,
60
- double (*f)(double, int, double, double),
61
- int (*f2)(int, const double*, int, double*, double, double, double*))
62
- {
63
- gsl_vector *x, *ws, *y;
64
- double a, b;
65
- VALUE ary;
66
- size_t len, i;
67
- int n, flag = 0;
68
- #ifdef HAVE_NARRAY_H
69
- double *ptr1, *ptr2;
70
- struct NARRAY *na;
71
- #endif
72
- if (argc < 4) rb_raise(rb_eArgError, "Too few arguments (%d for >= 4)", argc);
73
- if (VECTOR_P(argv[0])) {
74
- Data_Get_Struct(argv[0], gsl_vector, x);
75
- y = gsl_vector_alloc(x->size);
76
- ary = Data_Wrap_Struct(VECTOR_ROW_COL(CLASS_OF(x)), 0, gsl_vector_free, y);
77
- switch (argc) {
78
- case 4:
79
- ws = gsl_vector_alloc(2*x->size);
80
- flag = 1;
81
- break;
82
- case 5:
83
- CHECK_VECTOR(argv[4]);
84
- Data_Get_Struct(argv[4], gsl_vector, ws);
85
- break;
86
- default:
87
- rb_raise(rb_eArgError, "Too many arguments (%d for 4 or 5)", argc);
88
- }
89
- (*f2)(x->size, x->data, FIX2INT(argv[1]), y->data, NUM2DBL(argv[2]), NUM2DBL(argv[3]),
90
- ws->data);
91
- if (flag == 1) gsl_vector_free(ws);
92
- return ary;
93
- } else if (TYPE(argv[0]) == T_ARRAY) {
94
- n = FIX2INT(argv[1]);
95
- a = NUM2DBL(argv[2]);
96
- b = NUM2DBL(argv[3]);
97
- // len = RARRAY(argv[0])->len;
98
- len = RARRAY_LEN(argv[0]);
99
- ary = rb_ary_new2(len);
100
- for (i = 0; i < len; i++) {
101
- rb_ary_store(ary, i, rb_float_new((*f)(NUM2DBL(rb_ary_entry(argv[0], i)), n, a, b)));
102
- }
103
- return ary;
104
- #ifdef HAVE_NARRAY_H
105
- } else if (NA_IsNArray(argv[0])) {
106
- GetNArray(argv[0], na);
107
- len = na->total;
108
- ptr1 = (double*) na->ptr;
109
- ary = na_make_object(NA_DFLOAT, na->rank, na->shape, CLASS_OF(argv[0]));
110
- ptr2 = NA_PTR_TYPE(ary, double*);
111
- n = FIX2INT(argv[1]);
112
- a = NUM2DBL(argv[2]);
113
- b = NUM2DBL(argv[3]);
114
- ws = gsl_vector_alloc(len);
115
- (*f2)(len, ptr1, n, ptr2, a, b, ws->data);
116
- gsl_vector_free(ws);
117
- return ary;
118
- #endif
119
- } else {
120
- return rb_float_new((*f)(NUM2DBL(argv[0]), FIX2INT(argv[1]), NUM2DBL(argv[2]), NUM2DBL(argv[3])));
121
- }
122
-
123
- }
124
- static VALUE rb_jac_jacobi_P0_e(VALUE module, VALUE x, VALUE a, VALUE b)
125
- {
126
- return jac_eval3_e(x, a, b, jac_jacobi_P0_e);
127
- }
128
-
129
- static VALUE rb_jac_jacobi_P0(VALUE module, VALUE x, VALUE a, VALUE b)
130
- {
131
- return jac_eval3(x, a, b, jac_jacobi_P0);
132
- }
133
-
134
- static VALUE rb_jac_jacobi_P1_e(VALUE module, VALUE x, VALUE a, VALUE b)
135
- {
136
- return jac_eval3_e(x, a, b, jac_jacobi_P1_e);
137
- }
138
-
139
- static VALUE rb_jac_jacobi_P1(VALUE module, VALUE x, VALUE a, VALUE b)
140
- {
141
- return jac_eval3(x, a, b, jac_jacobi_P1);
142
- }
143
-
144
-
145
- static VALUE rb_jac_jacobi(int argc, VALUE *argv, VALUE module)
146
- {
147
- return rb_jac_jacobi_eval(argc, argv, jac_jacobi, jac_jacobi_array);
148
- }
149
-
150
- static VALUE rb_jac_djacobi_P0_e(VALUE module, VALUE x, VALUE a, VALUE b)
151
- {
152
- return jac_eval3_e(x, a, b, jac_djacobi_P0_e);
153
- }
154
-
155
- static VALUE rb_jac_djacobi_P0(VALUE module, VALUE x, VALUE a, VALUE b)
156
- {
157
- return jac_eval3(x, a, b, jac_djacobi_P0);
158
- }
159
-
160
- static VALUE rb_jac_djacobi_P1_e(VALUE module, VALUE x, VALUE a, VALUE b)
161
- {
162
- return jac_eval3_e(x, a, b, jac_djacobi_P1_e);
163
- }
164
-
165
- static VALUE rb_jac_djacobi_P1(VALUE module, VALUE x, VALUE a, VALUE b)
166
- {
167
- return jac_eval3(x, a, b, jac_djacobi_P1);
168
- }
169
-
170
- static VALUE rb_jac_djacobi(int argc, VALUE *argv, VALUE module)
171
- {
172
- return rb_jac_jacobi_eval(argc, argv, jac_djacobi, jac_djacobi_array);
173
- }
174
-
175
- static VALUE rb_jac_zeros_eval(int argc, VALUE *argv, VALUE module,
176
- int (*f)(double*, int, double, double))
177
- {
178
- gsl_vector *x;
179
- int m, status;
180
- double a, b;
181
- VALUE xx;
182
- switch (argc) {
183
- case 3:
184
- if (FIXNUM_P(argv[0])) {
185
- m = FIX2INT(argv[0]);
186
- a = NUM2DBL(argv[1]);
187
- b = NUM2DBL(argv[2]);
188
- x = gsl_vector_alloc(m);
189
- xx = Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, x);
190
- } else if (VECTOR_P(argv[0])) {
191
- Data_Get_Struct(argv[0], gsl_vector, x);
192
- m = x->size;
193
- a = NUM2DBL(argv[1]);
194
- b = NUM2DBL(argv[2]);
195
- xx = argv[0];
196
- } else {
197
- rb_raise(rb_eTypeError, "Wrong argument type %s (Fixnum or GSL::Vector expected)",
198
- rb_class2name(CLASS_OF(argv[0])));
199
- }
200
- break;
201
- case 4:
202
- CHECK_VECTOR(argv[0]);
203
- Data_Get_Struct(argv[0], gsl_vector, x);
204
- m = FIX2INT(argv[1]);
205
- a = NUM2DBL(argv[2]);
206
- b = NUM2DBL(argv[3]);
207
- break;
208
- default:
209
- rb_raise(rb_eArgError, "Wrong number of arguments (%d for 3 or 4)", argc);
210
- }
211
- status = (*f)(x->data, m, a, b);
212
- if (status != GSL_SUCCESS)
213
- rb_raise(rb_eRuntimeError, "Something wrong. (error code %d)", status);
214
- return xx;
215
- }
216
-
217
- static VALUE rb_jac_jacobi_zeros(int argc, VALUE *argv, VALUE module)
218
- {
219
- return rb_jac_zeros_eval(argc, argv, module, jac_jacobi_zeros);
220
- }
221
-
222
- static void jac_define_const(VALUE module)
223
- {
224
- rb_define_const(module, "GJ", INT2FIX(JAC_GJ));
225
- rb_define_const(module, "GLJ", INT2FIX(JAC_GLJ));
226
- rb_define_const(module, "GRJM", INT2FIX(JAC_GRJM));
227
- rb_define_const(module, "GRJP", INT2FIX(JAC_GRJP));
228
- }
229
-
230
- static VALUE rb_jac_quadrature_alloc(VALUE klass, VALUE vQ)
231
- {
232
- jac_quadrature *q;
233
-
234
- q = jac_quadrature_alloc(FIX2INT(vQ));
235
-
236
- return Data_Wrap_Struct(klass, 0, jac_quadrature_free, q);
237
- }
238
-
239
- static VALUE rb_jac_quadrature_Q(VALUE obj)
240
- {
241
- jac_quadrature *q;
242
- Data_Get_Struct(obj, jac_quadrature, q);
243
- return INT2FIX(q->Q);
244
- }
245
-
246
- static VALUE rb_jac_quadrature_type(VALUE obj)
247
- {
248
- jac_quadrature *q;
249
- Data_Get_Struct(obj, jac_quadrature, q);
250
- return INT2FIX((int) q->type);
251
- }
252
-
253
- static VALUE rb_jac_quadrature_alpha(VALUE obj)
254
- {
255
- jac_quadrature *q;
256
- Data_Get_Struct(obj, jac_quadrature, q);
257
- return NUM2DBL(q->alpha);
258
- }
259
-
260
- static VALUE rb_jac_quadrature_beta(VALUE obj)
261
- {
262
- jac_quadrature *q;
263
- Data_Get_Struct(obj, jac_quadrature, q);
264
- return NUM2DBL(q->beta);
265
- }
266
-
267
- static VALUE rb_jac_quadrature_x(VALUE obj)
268
- {
269
- jac_quadrature *q;
270
- gsl_vector_view *v;
271
- Data_Get_Struct(obj, jac_quadrature, q);
272
- v = gsl_vector_view_alloc();
273
- v->vector.data = q->x;
274
- v->vector.size = q->Q;
275
- v->vector.stride = 1;
276
- return Data_Wrap_Struct(cgsl_vector_view, 0, gsl_vector_view_free, v);
277
- }
278
-
279
- static VALUE rb_jac_quadrature_w(VALUE obj)
280
- {
281
- jac_quadrature *q;
282
- gsl_vector_view *v;
283
- Data_Get_Struct(obj, jac_quadrature, q);
284
- v = gsl_vector_view_alloc();
285
- v->vector.data = q->w;
286
- v->vector.size = q->Q;
287
- v->vector.stride = 1;
288
- return Data_Wrap_Struct(cgsl_vector_view, 0, gsl_vector_view_free, v);
289
- }
290
-
291
- static VALUE rb_jac_quadrature_D(VALUE obj)
292
- {
293
- jac_quadrature *q;
294
- gsl_vector_view *v;
295
- Data_Get_Struct(obj, jac_quadrature, q);
296
- v = gsl_vector_view_alloc();
297
- v->vector.data = q->D;
298
- v->vector.size = q->Q;
299
- v->vector.stride = 1;
300
- return Data_Wrap_Struct(cgsl_vector_view, 0, gsl_vector_view_free, v);
301
- }
302
-
303
- static VALUE rb_jac_quadrature_xp(VALUE obj)
304
- {
305
- jac_quadrature *q;
306
- gsl_vector_view *v;
307
- Data_Get_Struct(obj, jac_quadrature, q);
308
- v = gsl_vector_view_alloc();
309
- v->vector.data = q->w;
310
- v->vector.size = q->np;
311
- v->vector.stride = 1;
312
- return Data_Wrap_Struct(cgsl_vector_view, 0, gsl_vector_view_free, v);
313
- }
314
-
315
- static VALUE rb_jac_interpmat_alloc(int argc, VALUE *argv, VALUE obj)
316
- {
317
- int err;
318
- jac_quadrature *q;
319
- gsl_vector *xp;
320
- int np;
321
- Data_Get_Struct(obj, jac_quadrature, q);
322
- switch (argc) {
323
- case 1:
324
- CHECK_VECTOR(argv[0]);
325
- Data_Get_Struct(argv[0], gsl_vector, xp);
326
- np = xp->size;
327
- break;
328
- case 2:
329
- CHECK_VECTOR(argv[1]);
330
- Data_Get_Struct(argv[1], gsl_vector, xp);
331
- np = FIX2INT(argv[0]);
332
- break;
333
- default:
334
- rb_raise(rb_eArgError, "Wrong number of arguments (%d for 1 or 2)", argc);
335
- }
336
- err = jac_interpmat_alloc(q, np, xp->data);
337
- return FIX2INT(err);
338
- }
339
-
340
- static VALUE rb_jac_interpmat_free(VALUE obj)
341
- {
342
- jac_quadrature *q;
343
- Data_Get_Struct(obj, jac_quadrature, q);
344
- jac_interpmat_free(q);
345
- return Qtrue;
346
- }
347
-
348
- static VALUE rb_jac_quadrature_zwd(int argc, VALUE *argv, VALUE obj)
349
- {
350
- jac_quadrature *q;
351
- gsl_vector *ws;
352
- int flag = 0, type, status;
353
- double a, b;
354
- Data_Get_Struct(obj, jac_quadrature, q);
355
- switch (argc) {
356
- case 3:
357
- type = FIX2INT(argv[0]);
358
- a = NUM2DBL(argv[1]);
359
- b = NUM2DBL(argv[2]);
360
- ws = gsl_vector_alloc(q->Q);
361
- flag = 1;
362
- break;
363
- case 4:
364
- type = FIX2INT(argv[0]);
365
- a = NUM2DBL(argv[1]);
366
- b = NUM2DBL(argv[2]);
367
- Data_Get_Struct(argv[3], gsl_vector, ws);
368
- break;
369
- default:
370
- rb_raise(rb_eArgError, "Wrong number of arguments (%d for 3 or 4)", argc);
371
- }
372
- status = jac_quadrature_zwd(q, type, a, b, ws->data);
373
- if (flag == 1) gsl_vector_free(ws);
374
- return INT2FIX(status);
375
- }
376
-
377
- static VALUE rb_jac_integrate(VALUE obj, VALUE ff)
378
- {
379
- jac_quadrature *q;
380
- gsl_vector *f;
381
- CHECK_VECTOR(ff);
382
- Data_Get_Struct(obj, jac_quadrature, q);
383
- Data_Get_Struct(ff, gsl_vector, f);
384
- return rb_float_new(jac_integrate(q, f->data));
385
- }
386
-
387
- static VALUE rb_jac_interpolate(int argc, VALUE *argv, VALUE obj)
388
- {
389
- jac_quadrature *q;
390
- gsl_vector *f, *fout;
391
- VALUE vfout;
392
- switch (argc) {
393
- case 1:
394
- CHECK_VECTOR(argv[0]);
395
- Data_Get_Struct(argv[0], gsl_vector, f);
396
- fout = gsl_vector_alloc(f->size);
397
- vfout = Data_Wrap_Struct(VECTOR_ROW_COL(CLASS_OF(argv[0])), 0, gsl_vector_free, fout);
398
- break;
399
- case 2:
400
- CHECK_VECTOR(argv[0]);
401
- Data_Get_Struct(argv[0], gsl_vector, f);
402
- CHECK_VECTOR(argv[1]);
403
- Data_Get_Struct(argv[1], gsl_vector, fout);
404
- vfout = argv[1];
405
- break;
406
- default:
407
- rb_raise(rb_eArgError, "Wrong number of arguments (%d for 1 or 2)", argc);
408
- }
409
- Data_Get_Struct(obj, jac_quadrature, q);
410
- jac_interpolate(q, f->data, fout->data);
411
- return vfout;
412
- }
413
-
414
- static VALUE rb_jac_differentiate(int argc, VALUE *argv, VALUE obj)
415
- {
416
- jac_quadrature *q;
417
- gsl_vector *f, *fout;
418
- VALUE vfout;
419
- switch (argc) {
420
- case 1:
421
- CHECK_VECTOR(argv[0]);
422
- Data_Get_Struct(argv[0], gsl_vector, f);
423
- fout = gsl_vector_alloc(f->size);
424
- vfout = Data_Wrap_Struct(VECTOR_ROW_COL(CLASS_OF(argv[0])), 0, gsl_vector_free, fout);
425
- break;
426
- case 2:
427
- CHECK_VECTOR(argv[0]);
428
- Data_Get_Struct(argv[0], gsl_vector, f);
429
- CHECK_VECTOR(argv[1]);
430
- Data_Get_Struct(argv[1], gsl_vector, fout);
431
- vfout = argv[1];
432
- break;
433
- default:
434
- rb_raise(rb_eArgError, "Wrong number of arguments (%d for 1 or 2)", argc);
435
- }
436
- Data_Get_Struct(obj, jac_quadrature, q);
437
- jac_differentiate(q, f->data, fout->data);
438
- return vfout;
439
- }
440
-
441
- /*****/
442
- static VALUE rb_jac_qeval(int argc, VALUE *argv,
443
- int (*f)(double*, double*, const int, double, double, double*))
444
- {
445
- gsl_vector *z, *D, *ws;
446
- int Q;
447
- int flag = 0, status;
448
- double alpha, beta;
449
- VALUE vD;
450
- if (argc < 3) rb_raise(rb_eArgError, "Too few arguments (%d for >= 3)", argc);
451
- CHECK_VECTOR(argv[0]);
452
- Data_Get_Struct(argv[0], gsl_vector, z);
453
- argc -= 1;
454
- argv += 1;
455
- if (VECTOR_P(argv[argc-1])) {
456
- Data_Get_Struct(argv[argc-1], gsl_vector, ws);
457
- argc -= 1;
458
- } else {
459
- ws = gsl_vector_alloc(z->size);
460
- flag = 1;
461
- }
462
- switch (argc) {
463
- case 2:
464
- Q = z->size;
465
- D = gsl_vector_alloc(Q*Q);
466
- alpha = NUM2DBL(argv[0]);
467
- beta = NUM2DBL(argv[1]);
468
- vD = Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, D);
469
- break;
470
- case 4:
471
- Data_Get_Struct(argv[0], gsl_vector, D);
472
- vD = argv[0];
473
- Q = FIX2INT(argv[1]);
474
- alpha = NUM2DBL(argv[2]);
475
- beta = NUM2DBL(argv[3]);
476
- break;
477
- case 3:
478
- if (VECTOR_P(argv[0])) {
479
- Q = z->size;
480
- Data_Get_Struct(argv[0], gsl_vector, D);
481
- vD = argv[0];
482
- } else {
483
- Q = FIX2INT(argv[0]);
484
- D = gsl_vector_alloc(Q*Q);
485
- vD = Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, D);
486
- }
487
- alpha = NUM2DBL(argv[1]);
488
- beta = NUM2DBL(argv[2]);
489
- break;
490
- default:
491
- rb_raise(rb_eArgError, "Wrong number of arguments.");
492
- }
493
- status = (*f)(z->data, D->data, Q, alpha, beta, ws->data);
494
- if (flag == 1) gsl_vector_free(ws);
495
- if (status != GSL_SUCCESS) rb_raise(rb_eRuntimeError, "Something wrong.");
496
- return vD;
497
- }
498
-
499
- static VALUE rb_jac_diffmat_gj(int argc, VALUE *argv, VALUE module)
500
- {
501
- return rb_jac_qeval(argc, argv, jac_diffmat_gj);
502
- }
503
-
504
- static VALUE rb_jac_diffmat_glj(int argc, VALUE *argv, VALUE module)
505
- {
506
- return rb_jac_qeval(argc, argv, jac_diffmat_glj);
507
- }
508
-
509
- static VALUE rb_jac_diffmat_grjm(int argc, VALUE *argv, VALUE module)
510
- {
511
- return rb_jac_qeval(argc, argv, jac_diffmat_grjm);
512
- }
513
-
514
- static VALUE rb_jac_diffmat_grjp(int argc, VALUE *argv, VALUE module)
515
- {
516
- return rb_jac_qeval(argc, argv, jac_diffmat_grjp);
517
- }
518
-
519
- static VALUE rb_jac_weights_gj(int argc, VALUE *argv, VALUE module)
520
- {
521
- return rb_jac_qeval(argc, argv, jac_weights_gj);
522
- }
523
-
524
- static VALUE rb_jac_weights_glj(int argc, VALUE *argv, VALUE module)
525
- {
526
- return rb_jac_qeval(argc, argv, jac_weights_glj);
527
- }
528
-
529
- static VALUE rb_jac_weights_grjm(int argc, VALUE *argv, VALUE module)
530
- {
531
- return rb_jac_qeval(argc, argv, jac_weights_grjm);
532
- }
533
-
534
- static VALUE rb_jac_weights_grjp(int argc, VALUE *argv, VALUE module)
535
- {
536
- return rb_jac_qeval(argc, argv, jac_weights_grjp);
537
- }
538
-
539
- static VALUE rb_jac_zeros_gj(int argc, VALUE *argv, VALUE module)
540
- {
541
- return rb_jac_zeros_eval(argc, argv, module, jac_zeros_gj);
542
- }
543
- static VALUE rb_jac_zeros_glj(int argc, VALUE *argv, VALUE module)
544
- {
545
- return rb_jac_zeros_eval(argc, argv, module, jac_zeros_glj);
546
- }
547
- static VALUE rb_jac_zeros_grjm(int argc, VALUE *argv, VALUE module)
548
- {
549
- return rb_jac_zeros_eval(argc, argv, module, jac_zeros_grjm);
550
- }
551
- static VALUE rb_jac_zeros_grjp(int argc, VALUE *argv, VALUE module)
552
- {
553
- return rb_jac_zeros_eval(argc, argv, module, jac_zeros_grjp);
554
- }
555
-
556
- static VALUE rb_jac_lagrange_eval(int argc, VALUE *argv,
557
- double (*f)(int, double, int, double*, double, double))
558
- {
559
- gsl_vector *z;
560
- int i, Q;
561
- double alpha, beta, zz;
562
-
563
- switch (argc) {
564
- case 5:
565
- i = FIX2INT(argv[0]);
566
- zz = NUM2DBL(argv[1]);
567
- CHECK_VECTOR(argv[2]);
568
- Data_Get_Struct(argv[2], gsl_vector, z);
569
- Q = z->size;
570
- alpha = NUM2DBL(argv[3]);
571
- beta = NUM2DBL(argv[4]);
572
- break;
573
- case 6:
574
- i = FIX2INT(argv[0]);
575
- zz = NUM2DBL(argv[1]);
576
- Q = FIX2INT(argv[2]);
577
- CHECK_VECTOR(argv[3]);
578
- Data_Get_Struct(argv[3], gsl_vector, z);
579
- alpha = NUM2DBL(argv[4]);
580
- beta = NUM2DBL(argv[5]);
581
- break;
582
- default:
583
- rb_raise(rb_eArgError, "Wrong number of arguments (%d for 5 or 6)", argc);
584
- }
585
- return rb_float_new((*f)(i, zz, Q, z->data, alpha, beta));
586
- }
587
-
588
- static VALUE rb_jac_lagrange_gj(int argc, VALUE *argv, VALUE module)
589
- {
590
- return rb_jac_lagrange_eval(argc, argv, jac_lagrange_gj);
591
- }
592
- static VALUE rb_jac_lagrange_glj(int argc, VALUE *argv, VALUE module)
593
- {
594
- return rb_jac_lagrange_eval(argc, argv, jac_lagrange_glj);
595
- }
596
- static VALUE rb_jac_lagrange_grjm(int argc, VALUE *argv, VALUE module)
597
- {
598
- return rb_jac_lagrange_eval(argc, argv, jac_lagrange_grjm);
599
- }
600
-
601
- static VALUE rb_jac_lagrange_grjp(int argc, VALUE *argv, VALUE module)
602
- {
603
- return rb_jac_lagrange_eval(argc, argv, jac_lagrange_grjp);
604
- }
605
-
606
- static VALUE rb_jac_interpmat_eval(int argc, VALUE *argv,
607
- int (*f) (double*, double*, int, double*, int, double, double))
608
- {
609
- gsl_vector *imat, *zp, *z;
610
- double alpha, beta;
611
- int np, Q, status;
612
- VALUE vimat;
613
-
614
- if (argc < 3) rb_raise(rb_eArgError, "Too few arguments (%d for >= 3)", argc);
615
-
616
- CHECK_VECTOR(argv[0]);
617
- if (VECTOR_P(argv[1])) {
618
- Data_Get_Struct(argv[0], gsl_vector, imat);
619
- Data_Get_Struct(argv[1], gsl_vector, zp);
620
- vimat = argv[0];
621
- if (FIXNUM_P(argv[2])) np = FIX2INT(argv[2]);
622
- argc -= 3;
623
- argv += 3;
624
- } else {
625
- Data_Get_Struct(argv[0], gsl_vector, zp);
626
- if (FIXNUM_P(argv[1])) np = FIX2INT(argv[1]);
627
- else np = zp->size;
628
- imat = gsl_vector_alloc(np);
629
- vimat = Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, imat);
630
- argc -= 2;
631
- argv += 2;
632
- }
633
- CHECK_VECTOR(argv[0]);
634
- Data_Get_Struct(argv[0], gsl_vector, z);
635
- argc -= 1;
636
- argv += 1;
637
- switch (argc) {
638
- case 3:
639
- Q = FIX2INT(argv[0]);
640
- alpha = NUM2DBL(argv[1]);
641
- beta = NUM2DBL(argv[2]);
642
- break;
643
- case 2:
644
- Q = z->size;
645
- alpha = NUM2DBL(argv[0]);
646
- beta = NUM2DBL(argv[1]);
647
- break;
648
- default:
649
- rb_raise(rb_eArgError, "Wrong number of arguments.");
650
- }
651
- (*f)(imat->data, zp->data, np, z->data, Q, alpha, beta);
652
- if (status != GSL_SUCCESS) rb_raise(rb_eRuntimeError, "Some error.");
653
- return vimat;
654
- }
655
-
656
- static VALUE rb_jac_interpmat_gj(int argc, VALUE *argv, VALUE module)
657
- {
658
- return rb_jac_interpmat_eval(argc, argv, jac_interpmat_gj);
659
- }
660
-
661
- static VALUE rb_jac_interpmat_glj(int argc, VALUE *argv, VALUE module)
662
- {
663
- return rb_jac_interpmat_eval(argc, argv, jac_interpmat_glj);
664
- }
665
- static VALUE rb_jac_interpmat_grjm(int argc, VALUE *argv, VALUE module)
666
- {
667
- return rb_jac_interpmat_eval(argc, argv, jac_interpmat_grjm);
668
- }
669
- static VALUE rb_jac_interpmat_grjp(int argc, VALUE *argv, VALUE module)
670
- {
671
- return rb_jac_interpmat_eval(argc, argv, jac_interpmat_grjp);
672
- }
673
- void Init_jacobi(VALUE module)
674
- {
675
- VALUE mjac, cjacq;
676
-
677
- mjac = rb_define_module("Jac");
678
- jac_define_const(mjac);
679
- cjacq = rb_define_class_under(mjac, "Quadrature", cGSL_Object);
680
-
681
- rb_define_module_function(mjac, "jacobi_P0_e", rb_jac_jacobi_P0_e, 3);
682
- rb_define_module_function(mjac, "jacobi_P0", rb_jac_jacobi_P0, 3);
683
- rb_define_module_function(mjac, "jacobi_P1_e", rb_jac_jacobi_P1_e, 3);
684
- rb_define_module_function(mjac, "jacobi_P1", rb_jac_jacobi_P1, 3);
685
- rb_define_module_function(mjac, "jacobi", rb_jac_jacobi, -1);
686
- rb_define_module_function(mjac, "djacobi_P0_e", rb_jac_djacobi_P0_e, 3);
687
- rb_define_module_function(mjac, "djacobi_P0", rb_jac_djacobi_P0, 3);
688
- rb_define_module_function(mjac, "djacobi_P1_e", rb_jac_djacobi_P1_e, 3);
689
- rb_define_module_function(mjac, "djacobi_P1", rb_jac_djacobi_P1, 3);
690
- rb_define_module_function(mjac, "djacobi", rb_jac_djacobi, 4);
691
-
692
- rb_define_module_function(mjac, "jacobi_zeros", rb_jac_jacobi_zeros, -1);
693
-
694
- /*****/
695
- rb_define_singleton_method(cjacq, "alloc", rb_jac_quadrature_alloc, 1);
696
- rb_define_method(cjacq, "Q", rb_jac_quadrature_Q, 0);
697
- rb_define_method(cjacq, "type", rb_jac_quadrature_type, 0);
698
- rb_define_method(cjacq, "alpha", rb_jac_quadrature_alpha, 0);
699
- rb_define_method(cjacq, "beta", rb_jac_quadrature_beta, 0);
700
- rb_define_method(cjacq, "x", rb_jac_quadrature_x, 0);
701
- rb_define_method(cjacq, "w", rb_jac_quadrature_w, 0);
702
- rb_define_method(cjacq, "D", rb_jac_quadrature_D, 0);
703
- rb_define_method(cjacq, "xp", rb_jac_quadrature_xp, 0);
704
- rb_define_method(cjacq, "interpmat_alloc", rb_jac_interpmat_alloc, -1);
705
- rb_define_method(cjacq, "interpmat_free", rb_jac_interpmat_free, 0);
706
- rb_define_method(cjacq, "zwd", rb_jac_quadrature_zwd, -1);
707
- rb_define_method(cjacq, "integrate", rb_jac_integrate, 1);
708
- rb_define_method(cjacq, "interpolate", rb_jac_interpolate, -1);
709
- rb_define_method(cjacq, "differentiate", rb_jac_differentiate, -1);
710
- /*****/
711
- rb_define_module_function(mjac, "diffmat_gj", rb_jac_diffmat_gj, -1);
712
- rb_define_module_function(mjac, "diffmat_glj", rb_jac_diffmat_glj, -1);
713
- rb_define_module_function(mjac, "diffmat_grjm", rb_jac_diffmat_grjm, -1);
714
- rb_define_module_function(mjac, "diffmat_grjp", rb_jac_diffmat_grjp, -1);
715
-
716
- rb_define_module_function(mjac, "weights_gj", rb_jac_weights_gj, -1);
717
- rb_define_module_function(mjac, "weights_glj", rb_jac_weights_glj, -1);
718
- rb_define_module_function(mjac, "weights_grjm", rb_jac_weights_grjm, -1);
719
- rb_define_module_function(mjac, "weights_grjp", rb_jac_weights_grjp, -1);
720
-
721
- rb_define_module_function(mjac, "zeros_gj", rb_jac_zeros_gj, -1);
722
- rb_define_module_function(mjac, "zeros_glj", rb_jac_zeros_glj, -1);
723
- rb_define_module_function(mjac, "zeros_grjm", rb_jac_zeros_grjm, -1);
724
- rb_define_module_function(mjac, "zeros_grjp", rb_jac_zeros_grjp, -1);
725
-
726
- rb_define_module_function(mjac, "lagrange_gj", rb_jac_lagrange_gj, -1);
727
- rb_define_module_function(mjac, "lagrange_glj", rb_jac_lagrange_glj, -1);
728
- rb_define_module_function(mjac, "lagrange_grjm", rb_jac_lagrange_grjm, -1);
729
- rb_define_module_function(mjac, "lagrange_grjp", rb_jac_lagrange_grjp, -1);
730
-
731
- rb_define_module_function(mjac, "interpmat_gj", rb_jac_interpmat_gj, -1);
732
- rb_define_module_function(mjac, "interpmat_glj", rb_jac_interpmat_glj, -1);
733
- rb_define_module_function(mjac, "interpmat_grjm", rb_jac_interpmat_grjm, -1);
734
- rb_define_module_function(mjac, "interpmat_grjp", rb_jac_interpmat_grjp, -1);
735
-
736
- }
737
-
738
- #endif
739
-