numo-gsl-alt 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/README.md +83 -0
  4. data/Rakefile +16 -0
  5. data/ext/numo/gsl/cdf/depend +17 -0
  6. data/ext/numo/gsl/cdf/erbpp_cdf.rb +44 -0
  7. data/ext/numo/gsl/cdf/extconf.rb +9 -0
  8. data/ext/numo/gsl/cdf/func_def.rb +610 -0
  9. data/ext/numo/gsl/const/const_2.4.rb +419 -0
  10. data/ext/numo/gsl/const/const_2.5.rb +419 -0
  11. data/ext/numo/gsl/const/const_2.6.rb +419 -0
  12. data/ext/numo/gsl/const/const_def.rb +419 -0
  13. data/ext/numo/gsl/const/depend +17 -0
  14. data/ext/numo/gsl/const/erbpp_const.rb +28 -0
  15. data/ext/numo/gsl/const/extconf.rb +9 -0
  16. data/ext/numo/gsl/err/depend +1 -0
  17. data/ext/numo/gsl/err/err.c +22 -0
  18. data/ext/numo/gsl/err/extconf.rb +9 -0
  19. data/ext/numo/gsl/extconf_gsl.rb +58 -0
  20. data/ext/numo/gsl/fit/depend +17 -0
  21. data/ext/numo/gsl/fit/erbpp_fit.rb +73 -0
  22. data/ext/numo/gsl/fit/extconf.rb +9 -0
  23. data/ext/numo/gsl/fit/func_2.4.rb +128 -0
  24. data/ext/numo/gsl/fit/func_2.5.rb +128 -0
  25. data/ext/numo/gsl/fit/func_2.6.rb +128 -0
  26. data/ext/numo/gsl/fit/func_def.rb +129 -0
  27. data/ext/numo/gsl/fit/tmpl/check_1d.c +9 -0
  28. data/ext/numo/gsl/fit/tmpl/fit_linear.c +53 -0
  29. data/ext/numo/gsl/fit/tmpl/fit_linear_est.c +56 -0
  30. data/ext/numo/gsl/fit/tmpl/fit_mul.c +50 -0
  31. data/ext/numo/gsl/fit/tmpl/fit_mul_est.c +47 -0
  32. data/ext/numo/gsl/fit/tmpl/fit_wlinear.c +59 -0
  33. data/ext/numo/gsl/fit/tmpl/fit_wmul.c +56 -0
  34. data/ext/numo/gsl/gen/erbln.rb +132 -0
  35. data/ext/numo/gsl/gen/erbpp2.rb +344 -0
  36. data/ext/numo/gsl/gen/erbpp_gsl.rb +170 -0
  37. data/ext/numo/gsl/gen/func_parser.rb +518 -0
  38. data/ext/numo/gsl/gen/tmpl/c_DFloat_f_DFloat.c +40 -0
  39. data/ext/numo/gsl/gen/tmpl/c_DFloat_f_SZ.c +41 -0
  40. data/ext/numo/gsl/gen/tmpl/c_DFloat_f_SZ_x2.c +44 -0
  41. data/ext/numo/gsl/gen/tmpl/c_DFloat_x2_f_DFloat_x2.c +45 -0
  42. data/ext/numo/gsl/gen/tmpl/c_double_f_double.c +16 -0
  43. data/ext/numo/gsl/gen/tmpl/c_double_f_sizet.c +16 -0
  44. data/ext/numo/gsl/gen/tmpl/c_double_f_sizet_x2.c +17 -0
  45. data/ext/numo/gsl/gen/tmpl/c_double_f_void.c +15 -0
  46. data/ext/numo/gsl/gen/tmpl/c_double_x2_f_void.c +17 -0
  47. data/ext/numo/gsl/gen/tmpl/c_new_DFloat.c +29 -0
  48. data/ext/numo/gsl/gen/tmpl/c_new_double.c +22 -0
  49. data/ext/numo/gsl/gen/tmpl/c_new_f_other.c +25 -0
  50. data/ext/numo/gsl/gen/tmpl/c_new_sizet.c +22 -0
  51. data/ext/numo/gsl/gen/tmpl/c_new_sizet_double.c +23 -0
  52. data/ext/numo/gsl/gen/tmpl/c_new_sizet_x2.c +23 -0
  53. data/ext/numo/gsl/gen/tmpl/c_new_void.c +21 -0
  54. data/ext/numo/gsl/gen/tmpl/c_other_f_void.c +19 -0
  55. data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat.c +46 -0
  56. data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat_x2.c +41 -0
  57. data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat_x3.c +44 -0
  58. data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat_x4.c +47 -0
  59. data/ext/numo/gsl/gen/tmpl/c_self_f_SZ_x2_DFloat.c +45 -0
  60. data/ext/numo/gsl/gen/tmpl/c_self_f_double.c +17 -0
  61. data/ext/numo/gsl/gen/tmpl/c_self_f_other.c +17 -0
  62. data/ext/numo/gsl/gen/tmpl/c_self_f_sizet.c +21 -0
  63. data/ext/numo/gsl/gen/tmpl/c_self_f_void.c +14 -0
  64. data/ext/numo/gsl/gen/tmpl/c_sizet_f_void.c +15 -0
  65. data/ext/numo/gsl/gen/tmpl/c_sizet_x2_f_void.c +17 -0
  66. data/ext/numo/gsl/gen/tmpl/c_str_f_void.c +15 -0
  67. data/ext/numo/gsl/gen/tmpl/c_super_new_void.c +18 -0
  68. data/ext/numo/gsl/gen/tmpl/c_uint_f_void.c +15 -0
  69. data/ext/numo/gsl/gen/tmpl/c_ulong_f_void.c +15 -0
  70. data/ext/numo/gsl/gen/tmpl/c_void_f_double.c +17 -0
  71. data/ext/numo/gsl/gen/tmpl/c_void_f_double_x2.c +18 -0
  72. data/ext/numo/gsl/gen/tmpl/c_void_f_double_x4.c +20 -0
  73. data/ext/numo/gsl/gen/tmpl/c_void_f_ulong.c +17 -0
  74. data/ext/numo/gsl/gen/tmpl/c_void_f_void.c +14 -0
  75. data/ext/numo/gsl/gen/tmpl/cast_1d_contiguous.c +15 -0
  76. data/ext/numo/gsl/gen/tmpl/cast_2d_contiguous.c +15 -0
  77. data/ext/numo/gsl/gen/tmpl/class.c +26 -0
  78. data/ext/numo/gsl/gen/tmpl/create_new_narray.c +26 -0
  79. data/ext/numo/gsl/gen/tmpl/init_class.c +10 -0
  80. data/ext/numo/gsl/gen/tmpl/init_module.c +12 -0
  81. data/ext/numo/gsl/gen/tmpl/lib.c +41 -0
  82. data/ext/numo/gsl/gen/tmpl/m_DFloat_Int_f_DFloat.c +38 -0
  83. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat.c +35 -0
  84. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_Int.c +39 -0
  85. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_UInt.c +39 -0
  86. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_double.c +42 -0
  87. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_double_x2.c +47 -0
  88. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_int.c +42 -0
  89. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_x2.c +38 -0
  90. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_x3.c +41 -0
  91. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_Int.c +36 -0
  92. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt.c +36 -0
  93. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32.c +36 -0
  94. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_double.c +43 -0
  95. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_double_uint.c +49 -0
  96. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_double_x2.c +48 -0
  97. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_uint_x3.c +51 -0
  98. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_double.c +43 -0
  99. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_double_uint.c +50 -0
  100. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_double_x2.c +48 -0
  101. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_uint_x3.c +51 -0
  102. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_int_DFloat.c +41 -0
  103. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_int_DFloat_x2.c +44 -0
  104. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_int_x2_DFloat_x2.c +46 -0
  105. data/ext/numo/gsl/gen/tmpl/m_Int_f_DFloat.c +36 -0
  106. data/ext/numo/gsl/gen/tmpl/m_Int_f_DFloat_x3.c +42 -0
  107. data/ext/numo/gsl/gen/tmpl/m_Int_f_int_DFloat.c +42 -0
  108. data/ext/numo/gsl/gen/tmpl/m_Int_f_int_DFloat_x2.c +45 -0
  109. data/ext/numo/gsl/gen/tmpl/mod_func_noloop.c +54 -0
  110. data/ext/numo/gsl/gen/tmpl/mod_func_scalar.c +27 -0
  111. data/ext/numo/gsl/gen/tmpl/module.c +9 -0
  112. data/ext/numo/gsl/histogram/depend +17 -0
  113. data/ext/numo/gsl/histogram/erbpp_histogram.rb +109 -0
  114. data/ext/numo/gsl/histogram/extconf.rb +9 -0
  115. data/ext/numo/gsl/histogram/func_2.4.rb +742 -0
  116. data/ext/numo/gsl/histogram/func_2.5.rb +742 -0
  117. data/ext/numo/gsl/histogram/func_2.6.rb +742 -0
  118. data/ext/numo/gsl/histogram/func_def.rb +763 -0
  119. data/ext/numo/gsl/histogram/tmpl/c_DFloat_f_2d_get.c +54 -0
  120. data/ext/numo/gsl/histogram/tmpl/c_DFloat_f_field.c +35 -0
  121. data/ext/numo/gsl/histogram/tmpl/c_DFloat_f_get.c +47 -0
  122. data/ext/numo/gsl/histogram/tmpl/c_DFloat_x2_f_get_range.c +56 -0
  123. data/ext/numo/gsl/histogram/tmpl/c_bool_f_other.c +19 -0
  124. data/ext/numo/gsl/histogram/tmpl/c_bool_f_pdf_init.c +24 -0
  125. data/ext/numo/gsl/histogram/tmpl/c_self_f_2d_set_ranges.c +26 -0
  126. data/ext/numo/gsl/histogram/tmpl/c_self_f_set_ranges.c +21 -0
  127. data/ext/numo/gsl/histogram/tmpl/c_sizet_f_field.c +15 -0
  128. data/ext/numo/gsl/interp/depend +17 -0
  129. data/ext/numo/gsl/interp/erbpp_interp.rb +60 -0
  130. data/ext/numo/gsl/interp/extconf.rb +9 -0
  131. data/ext/numo/gsl/interp/func_2.4.rb +804 -0
  132. data/ext/numo/gsl/interp/func_2.5.rb +804 -0
  133. data/ext/numo/gsl/interp/func_2.6.rb +804 -0
  134. data/ext/numo/gsl/interp/func_def.rb +816 -0
  135. data/ext/numo/gsl/interp/parse_interp.rb +67 -0
  136. data/ext/numo/gsl/interp/tmpl/interp2d_new.c +36 -0
  137. data/ext/numo/gsl/interp/tmpl/interp2d_type_new.c +17 -0
  138. data/ext/numo/gsl/interp/tmpl/interp_bsearch.c +57 -0
  139. data/ext/numo/gsl/interp/tmpl/interp_new.c +29 -0
  140. data/ext/numo/gsl/interp/tmpl/interp_type_new.c +16 -0
  141. data/ext/numo/gsl/interp/tmpl/spline2d_eval.c +61 -0
  142. data/ext/numo/gsl/interp/tmpl/spline_eval.c +55 -0
  143. data/ext/numo/gsl/interp/tmpl/spline_integ.c +56 -0
  144. data/ext/numo/gsl/interp/type_def.rb +9 -0
  145. data/ext/numo/gsl/mkmf_gsl.rb +33 -0
  146. data/ext/numo/gsl/multifit/depend +17 -0
  147. data/ext/numo/gsl/multifit/erbpp_multifit.rb +99 -0
  148. data/ext/numo/gsl/multifit/extconf.rb +9 -0
  149. data/ext/numo/gsl/multifit/func_2.1.rb +1035 -0
  150. data/ext/numo/gsl/multifit/func_2.2.1.rb +736 -0
  151. data/ext/numo/gsl/multifit/func_2.2.rb +736 -0
  152. data/ext/numo/gsl/multifit/func_2.3.rb +872 -0
  153. data/ext/numo/gsl/multifit/func_2.4.rb +859 -0
  154. data/ext/numo/gsl/multifit/func_2.5.rb +859 -0
  155. data/ext/numo/gsl/multifit/func_2.6.rb +859 -0
  156. data/ext/numo/gsl/multifit/func_def.rb +1012 -0
  157. data/ext/numo/gsl/multifit/tmpl/multifit_linear.c +66 -0
  158. data/ext/numo/gsl/multifit/tmpl/multifit_linear_est.c +48 -0
  159. data/ext/numo/gsl/multifit/tmpl/multifit_linear_residuals.c +47 -0
  160. data/ext/numo/gsl/multifit/tmpl/multifit_wlinear.c +70 -0
  161. data/ext/numo/gsl/multifit/type_def.rb +1 -0
  162. data/ext/numo/gsl/multilarge/func_2.4.rb +216 -0
  163. data/ext/numo/gsl/multilarge/func_2.5.rb +216 -0
  164. data/ext/numo/gsl/multilarge/func_2.6.rb +216 -0
  165. data/ext/numo/gsl/multilarge/func_def.rb +215 -0
  166. data/ext/numo/gsl/numo_gsl.h +117 -0
  167. data/ext/numo/gsl/pdf/depend +17 -0
  168. data/ext/numo/gsl/pdf/erbpp_pdf.rb +27 -0
  169. data/ext/numo/gsl/pdf/extconf.rb +9 -0
  170. data/ext/numo/gsl/pdf/func_2.2.1.rb +306 -0
  171. data/ext/numo/gsl/pdf/func_2.2.rb +306 -0
  172. data/ext/numo/gsl/pdf/func_2.3.rb +306 -0
  173. data/ext/numo/gsl/pdf/func_2.4.rb +303 -0
  174. data/ext/numo/gsl/pdf/func_2.5.rb +333 -0
  175. data/ext/numo/gsl/pdf/func_2.6.rb +333 -0
  176. data/ext/numo/gsl/pdf/func_def.rb +282 -0
  177. data/ext/numo/gsl/pdf/parse_pdf.rb +42 -0
  178. data/ext/numo/gsl/pdf/tmpl/dirichlet.c +39 -0
  179. data/ext/numo/gsl/pdf/tmpl/multinomial.c +39 -0
  180. data/ext/numo/gsl/poly/depend +17 -0
  181. data/ext/numo/gsl/poly/erbpp_poly.rb +70 -0
  182. data/ext/numo/gsl/poly/extconf.rb +9 -0
  183. data/ext/numo/gsl/poly/func_2.4.rb +220 -0
  184. data/ext/numo/gsl/poly/func_2.5.rb +220 -0
  185. data/ext/numo/gsl/poly/func_2.6.rb +220 -0
  186. data/ext/numo/gsl/poly/func_def.rb +234 -0
  187. data/ext/numo/gsl/poly/tmpl/poly_complex_solve.c +59 -0
  188. data/ext/numo/gsl/poly/tmpl/poly_eval.c +70 -0
  189. data/ext/numo/gsl/poly/tmpl/poly_eval_derivs.c +40 -0
  190. data/ext/numo/gsl/ran/depend +17 -0
  191. data/ext/numo/gsl/ran/erbpp_ran.rb +43 -0
  192. data/ext/numo/gsl/ran/extconf.rb +9 -0
  193. data/ext/numo/gsl/ran/func_2.2.1.rb +1658 -0
  194. data/ext/numo/gsl/ran/func_2.2.rb +1658 -0
  195. data/ext/numo/gsl/ran/func_2.3.rb +1658 -0
  196. data/ext/numo/gsl/ran/func_2.4.rb +1526 -0
  197. data/ext/numo/gsl/ran/func_2.5.rb +1573 -0
  198. data/ext/numo/gsl/ran/func_2.6.rb +1573 -0
  199. data/ext/numo/gsl/ran/func_def.rb +1594 -0
  200. data/ext/numo/gsl/ran/parse_ran.rb +10 -0
  201. data/ext/numo/gsl/rng/depend +17 -0
  202. data/ext/numo/gsl/rng/erbpp_rng.rb +59 -0
  203. data/ext/numo/gsl/rng/extconf.rb +9 -0
  204. data/ext/numo/gsl/rng/func_2.4.rb +187 -0
  205. data/ext/numo/gsl/rng/func_2.5.rb +187 -0
  206. data/ext/numo/gsl/rng/func_2.6.rb +187 -0
  207. data/ext/numo/gsl/rng/func_def.rb +230 -0
  208. data/ext/numo/gsl/rng/parse_rng.rb +126 -0
  209. data/ext/numo/gsl/rng/tmpl/ran.c +44 -0
  210. data/ext/numo/gsl/rng/tmpl/ran_DFloat_f_DFloat.c +28 -0
  211. data/ext/numo/gsl/rng/tmpl/ran_DFloat_x2.c +45 -0
  212. data/ext/numo/gsl/rng/tmpl/ran_DFloat_x3.c +51 -0
  213. data/ext/numo/gsl/rng/tmpl/ran_multinomial.c +32 -0
  214. data/ext/numo/gsl/rng/tmpl/rng_DFloat.c +29 -0
  215. data/ext/numo/gsl/rng/tmpl/rng_UInt.c +44 -0
  216. data/ext/numo/gsl/rng/tmpl/rng_alloc.c +24 -0
  217. data/ext/numo/gsl/rng/tmpl/rng_type_new.c +14 -0
  218. data/ext/numo/gsl/rng/type_def.rb +63 -0
  219. data/ext/numo/gsl/rstat/depend +17 -0
  220. data/ext/numo/gsl/rstat/erbpp_rstat.rb +64 -0
  221. data/ext/numo/gsl/rstat/extconf.rb +9 -0
  222. data/ext/numo/gsl/rstat/func_2.2.1.rb +116 -0
  223. data/ext/numo/gsl/rstat/func_2.2.rb +116 -0
  224. data/ext/numo/gsl/rstat/func_2.3.rb +123 -0
  225. data/ext/numo/gsl/rstat/func_2.4.rb +122 -0
  226. data/ext/numo/gsl/rstat/func_2.5.rb +122 -0
  227. data/ext/numo/gsl/rstat/func_2.6.rb +122 -0
  228. data/ext/numo/gsl/rstat/func_def.rb +102 -0
  229. data/ext/numo/gsl/sf/depend +17 -0
  230. data/ext/numo/gsl/sf/erbpp_sf.rb +51 -0
  231. data/ext/numo/gsl/sf/extconf.rb +9 -0
  232. data/ext/numo/gsl/sf/func_2.4.rb +4482 -0
  233. data/ext/numo/gsl/sf/func_2.5.rb +4508 -0
  234. data/ext/numo/gsl/sf/func_2.6.rb +4538 -0
  235. data/ext/numo/gsl/sf/func_def.rb +4703 -0
  236. data/ext/numo/gsl/sf/parse_sf.rb +277 -0
  237. data/ext/numo/gsl/sf/tmpl/c_DFloat_f_int_x2_DFloat.c +50 -0
  238. data/ext/numo/gsl/sf/tmpl/c_DFloat_f_int_x2_DFloat_x2.c +52 -0
  239. data/ext/numo/gsl/sf/tmpl/c_DFloat_f_int_x3_DFloat_x2.c +55 -0
  240. data/ext/numo/gsl/sf/tmpl/m_DFloat_f_DFloat_mode.c +47 -0
  241. data/ext/numo/gsl/sf/tmpl/m_DFloat_f_lmax_array.c +41 -0
  242. data/ext/numo/gsl/sf/tmpl/m_DFloat_f_nmin_nmax_array.c +49 -0
  243. data/ext/numo/gsl/spmatrix/const_2.2.1.rb +3 -0
  244. data/ext/numo/gsl/spmatrix/const_2.2.rb +3 -0
  245. data/ext/numo/gsl/spmatrix/const_2.3.rb +3 -0
  246. data/ext/numo/gsl/spmatrix/const_def.rb +2 -0
  247. data/ext/numo/gsl/spmatrix/depend +17 -0
  248. data/ext/numo/gsl/spmatrix/erbpp_spmatrix.rb +101 -0
  249. data/ext/numo/gsl/spmatrix/extconf.rb +9 -0
  250. data/ext/numo/gsl/spmatrix/func_2.2.1.rb +297 -0
  251. data/ext/numo/gsl/spmatrix/func_2.2.rb +297 -0
  252. data/ext/numo/gsl/spmatrix/func_2.3.rb +297 -0
  253. data/ext/numo/gsl/spmatrix/func_2.4.rb +300 -0
  254. data/ext/numo/gsl/spmatrix/func_2.5.rb +300 -0
  255. data/ext/numo/gsl/spmatrix/func_2.6.rb +372 -0
  256. data/ext/numo/gsl/spmatrix/func_def.rb +218 -0
  257. data/ext/numo/gsl/spmatrix/parse_spmatrix.rb +70 -0
  258. data/ext/numo/gsl/spmatrix/tmpl/itersolve_iterate.c +47 -0
  259. data/ext/numo/gsl/spmatrix/tmpl/itersolve_new.c +22 -0
  260. data/ext/numo/gsl/spmatrix/tmpl/itersolve_type_new.c +16 -0
  261. data/ext/numo/gsl/spmatrix/tmpl/spblas_dgemm.c +35 -0
  262. data/ext/numo/gsl/spmatrix/tmpl/spblas_dgemv.c +43 -0
  263. data/ext/numo/gsl/spmatrix/tmpl/spmatrix_add.c +22 -0
  264. data/ext/numo/gsl/spmatrix/tmpl/spmatrix_d2sp.c +28 -0
  265. data/ext/numo/gsl/spmatrix/tmpl/spmatrix_new.c +40 -0
  266. data/ext/numo/gsl/spmatrix/tmpl/spmatrix_sp2d.c +25 -0
  267. data/ext/numo/gsl/spmatrix/type_def.rb +1 -0
  268. data/ext/numo/gsl/stats/depend +17 -0
  269. data/ext/numo/gsl/stats/erbpp_stats.rb +30 -0
  270. data/ext/numo/gsl/stats/extconf.rb +9 -0
  271. data/ext/numo/gsl/stats/func_2.2.1.rb +608 -0
  272. data/ext/numo/gsl/stats/func_2.2.rb +608 -0
  273. data/ext/numo/gsl/stats/func_2.3.rb +608 -0
  274. data/ext/numo/gsl/stats/func_2.4.rb +583 -0
  275. data/ext/numo/gsl/stats/func_2.5.rb +718 -0
  276. data/ext/numo/gsl/stats/func_2.6.rb +718 -0
  277. data/ext/numo/gsl/stats/func_def.rb +608 -0
  278. data/ext/numo/gsl/stats/parse_stats.rb +63 -0
  279. data/ext/numo/gsl/stats/tmpl/stats_1a0p.c +37 -0
  280. data/ext/numo/gsl/stats/tmpl/stats_1a0p_index.c +60 -0
  281. data/ext/numo/gsl/stats/tmpl/stats_1a1p.c +41 -0
  282. data/ext/numo/gsl/stats/tmpl/stats_1a2p.c +42 -0
  283. data/ext/numo/gsl/stats/tmpl/stats_2a0p.c +39 -0
  284. data/ext/numo/gsl/stats/tmpl/stats_2a1p.c +43 -0
  285. data/ext/numo/gsl/stats/tmpl/stats_2a2p.c +44 -0
  286. data/ext/numo/gsl/stats/tmpl/stats_minmax.c +37 -0
  287. data/ext/numo/gsl/stats/tmpl/stats_minmax_index.c +67 -0
  288. data/ext/numo/gsl/stats/tmpl/stats_spearman.c +46 -0
  289. data/ext/numo/gsl/sys/const_2.4.rb +20 -0
  290. data/ext/numo/gsl/sys/const_2.5.rb +20 -0
  291. data/ext/numo/gsl/sys/const_2.6.rb +20 -0
  292. data/ext/numo/gsl/sys/const_def.rb +21 -0
  293. data/ext/numo/gsl/sys/depend +17 -0
  294. data/ext/numo/gsl/sys/enum_def.rb +75 -0
  295. data/ext/numo/gsl/sys/erbpp_sys.rb +60 -0
  296. data/ext/numo/gsl/sys/extconf.rb +9 -0
  297. data/ext/numo/gsl/sys/func_2.4.rb +236 -0
  298. data/ext/numo/gsl/sys/func_2.5.rb +236 -0
  299. data/ext/numo/gsl/sys/func_2.6.rb +236 -0
  300. data/ext/numo/gsl/sys/func_def.rb +249 -0
  301. data/ext/numo/gsl/version.h +1 -0
  302. data/ext/numo/gsl/wavelet/depend +17 -0
  303. data/ext/numo/gsl/wavelet/erbpp_wavelet.rb +48 -0
  304. data/ext/numo/gsl/wavelet/extconf.rb +9 -0
  305. data/ext/numo/gsl/wavelet/func_2.4.rb +304 -0
  306. data/ext/numo/gsl/wavelet/func_2.5.rb +304 -0
  307. data/ext/numo/gsl/wavelet/func_2.6.rb +304 -0
  308. data/ext/numo/gsl/wavelet/func_def.rb +337 -0
  309. data/ext/numo/gsl/wavelet/parse_wavelet.rb +47 -0
  310. data/ext/numo/gsl/wavelet/tmpl/wavelet2d_transform.c +56 -0
  311. data/ext/numo/gsl/wavelet/tmpl/wavelet_array_check.c +56 -0
  312. data/ext/numo/gsl/wavelet/tmpl/wavelet_macro.c +1 -0
  313. data/ext/numo/gsl/wavelet/tmpl/wavelet_new.c +20 -0
  314. data/ext/numo/gsl/wavelet/tmpl/wavelet_transform.c +55 -0
  315. data/ext/numo/gsl/wavelet/tmpl/wavelet_transform2.c +22 -0
  316. data/ext/numo/gsl/wavelet/tmpl/wavelet_type_new.c +15 -0
  317. data/ext/numo/gsl/wavelet/type_def.rb +6 -0
  318. data/lib/numo/gsl.rb +17 -0
  319. data/numo-gsl-alt.gemspec +33 -0
  320. metadata +406 -0
@@ -0,0 +1,37 @@
1
+ static void
2
+ iter_<%=c_func%>(na_loop_t *const lp)
3
+ {
4
+ size_t n;
5
+ char *p1, *p2;
6
+ ssize_t s1;
7
+
8
+ INIT_COUNTER(lp, n);
9
+ INIT_PTR(lp, 0, p1, s1);
10
+ p2 = lp->args[1].ptr + lp->args[1].iter[0].pos;
11
+
12
+ *(double*)p2 = <%=func_name%>((double*)p1,s1/sizeof(double),n);
13
+ }
14
+
15
+ /*
16
+ <%=desc%>
17
+ @overload <%=name%>(<%=method_args%>, axis:nil, keepdims:false)
18
+ <% desc_param.each do |x|%>
19
+ <%=x%><% end %>
20
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
21
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in the result array as dimensions with size one.
22
+ */
23
+ static VALUE
24
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
25
+ {
26
+ VALUE reduce;
27
+ ndfunc_arg_in_t ain[2] = {{cDF,0},{sym_reduce,0}};
28
+ ndfunc_arg_out_t aout[1] = {{cDF,0}};
29
+ ndfunc_t ndf = { iter_<%=c_func%>, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT,
30
+ 2, 1, ain, aout };
31
+
32
+ if (argc<1) {
33
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=1)",argc);
34
+ }
35
+ reduce = nary_reduce_dimension(argc-1, argv+1, 1, argv, &ndf, 0);
36
+ return na_ndloop(&ndf, 2, *argv, reduce);
37
+ }
@@ -0,0 +1,60 @@
1
+ <% [64,32].each do |i| %>
2
+ #define idx_t int<%=i%>_t
3
+ static void
4
+ iter_<%=c_func%>_index<%=i%>(na_loop_t *const lp)
5
+ {
6
+ size_t n, idx;
7
+ char *d_ptr, *i_ptr, *o_ptr;
8
+ ssize_t d_step, i_step;
9
+
10
+ INIT_COUNTER(lp, n);
11
+ INIT_PTR(lp, 0, d_ptr, d_step);
12
+
13
+ idx = <%=func_name%>((double*)d_ptr,d_step/sizeof(double),n);
14
+
15
+ INIT_PTR(lp, 1, i_ptr, i_step);
16
+ o_ptr = NDL_PTR(lp,2);
17
+ *(idx_t*)o_ptr = *(idx_t*)(i_ptr + i_step * idx);
18
+ }
19
+ #undef idx_t
20
+ <% end %>
21
+
22
+ /*
23
+ <%=desc%>
24
+ @overload <%=name%>() => Integer
25
+ @overload <%=name%>(axis:nil, keepdims:false) => Integer or Numo::Int32/64
26
+ <% desc_param.each do |x|%>
27
+ <%=x%><% end %>
28
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
29
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in th*/
30
+ static VALUE
31
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
32
+ {
33
+ narray_t *na;
34
+ VALUE idx, reduce;
35
+ ndfunc_arg_in_t ain[3] = {{cDF,0},{Qnil,0},{sym_reduce,0}};
36
+ ndfunc_arg_out_t aout[1] = {{0,0,0}};
37
+ ndfunc_t ndf = {0, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT, 3,1, ain,aout};
38
+
39
+ if (argc<1) {
40
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=1)",argc);
41
+ }
42
+ GetNArray(argv[0],na);
43
+ if (na->ndim==0) {
44
+ return INT2FIX(0);
45
+ }
46
+ if (na->size > (~(u_int32_t)0)) {
47
+ aout[0].type = numo_cInt64;
48
+ idx = rb_narray_new(numo_cInt64, na->ndim, na->shape);
49
+ ndf.func = iter_<%=c_func%>_index64;
50
+ } else {
51
+ aout[0].type = numo_cInt32;
52
+ idx = rb_narray_new(numo_cInt32, na->ndim, na->shape);
53
+ ndf.func = iter_<%=c_func%>_index32;
54
+ }
55
+ rb_funcall(idx, rb_intern("seq"), 0);
56
+
57
+ reduce = nary_reduce_dimension(argc-1, argv+1, 1, argv, &ndf, 0);
58
+
59
+ return na_ndloop(&ndf, 3, argv[0], idx, reduce);
60
+ }
@@ -0,0 +1,41 @@
1
+ static void
2
+ iter_<%=c_func%>(na_loop_t *const lp)
3
+ {
4
+ size_t n;
5
+ char *p1, *p2;
6
+ ssize_t s1;
7
+ double *opt = (double*)(lp->opt_ptr);
8
+
9
+ INIT_COUNTER(lp, n);
10
+ INIT_PTR(lp, 0, p1, s1);
11
+ p2 = lp->args[1].ptr + lp->args[1].iter[0].pos;
12
+
13
+ *(double*)p2 = <%=func_name%>((double*)p1,s1/sizeof(double),n,opt[0]);
14
+ }
15
+
16
+ /*
17
+ <%=desc%>
18
+ @overload <%=name%>(<%=method_args%>, axis:nil, keepdims:false)
19
+ <% desc_param.each do |x|%>
20
+ <%=x%><% end %>
21
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
22
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in th*/
23
+ static VALUE
24
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
25
+ {
26
+ VALUE reduce;
27
+ double opt[1];
28
+ ndfunc_arg_in_t ain[2] = {{cDF,0},{sym_reduce,0}};
29
+ ndfunc_arg_out_t aout[1] = {{cDF,0}};
30
+ ndfunc_t ndf = { iter_<%=c_func%>, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT,
31
+ 2, 1, ain, aout };
32
+
33
+ if (argc<2) {
34
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=2)",argc);
35
+ }
36
+
37
+ opt[0] = NUM2DBL(argv[1]);
38
+
39
+ reduce = nary_reduce_dimension(argc-2, argv+2, 1, argv, &ndf, 0);
40
+ return na_ndloop3(&ndf, opt, 2, argv[0], reduce);
41
+ }
@@ -0,0 +1,42 @@
1
+ static void
2
+ iter_<%=c_func%>(na_loop_t *const lp)
3
+ {
4
+ size_t n;
5
+ char *p1, *p2;
6
+ ssize_t s1;
7
+ double *opt = (double*)(lp->opt_ptr);
8
+
9
+ INIT_COUNTER(lp, n);
10
+ INIT_PTR(lp, 0, p1, s1);
11
+ p2 = lp->args[1].ptr + lp->args[1].iter[0].pos;
12
+
13
+ *(double*)p2 = <%=func_name%>((double*)p1,s1/sizeof(double),n,opt[0],opt[1]);
14
+ }
15
+
16
+ /*
17
+ <%=desc%>
18
+ @overload <%=name%>(<%=method_args%>, axis:nil, keepdims:false)
19
+ <% desc_param.each do |x|%>
20
+ <%=x%><% end %>
21
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
22
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in th*/
23
+ static VALUE
24
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
25
+ {
26
+ VALUE reduce;
27
+ double opt[2];
28
+ ndfunc_arg_in_t ain[2] = {{cDF,0},{sym_reduce,0}};
29
+ ndfunc_arg_out_t aout[1] = {{cDF,0}};
30
+ ndfunc_t ndf = { iter_<%=c_func%>, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT,
31
+ 2, 1, ain, aout };
32
+
33
+ if (argc<3) {
34
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=3)",argc);
35
+ }
36
+
37
+ opt[0] = NUM2DBL(argv[1]);
38
+ opt[1] = NUM2DBL(argv[2]);
39
+
40
+ reduce = nary_reduce_dimension(argc-3, argv+3, 1, argv, &ndf, 0);
41
+ return na_ndloop3(&ndf, opt, 2, argv[0], reduce);
42
+ }
@@ -0,0 +1,39 @@
1
+ static void
2
+ iter_<%=c_func%>(na_loop_t *const lp)
3
+ {
4
+ size_t n;
5
+ char *p1, *p2, *p3;
6
+ ssize_t s1, s2;
7
+
8
+ INIT_COUNTER(lp, n);
9
+ INIT_PTR(lp, 0, p1, s1);
10
+ INIT_PTR(lp, 1, p2, s2);
11
+ p3 = lp->args[2].ptr + lp->args[2].iter[0].pos;
12
+
13
+ *(double*)p3 = <%=func_name%>((double*)p1,s1/sizeof(double),
14
+ (double*)p2,s2/sizeof(double),n);
15
+ }
16
+
17
+ /*
18
+ <%=desc%>
19
+ @overload <%=name%>(<%=method_args%>, axis:nil, keepdims:false)
20
+ <% desc_param.each do |x|%>
21
+ <%=x%><% end %>
22
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
23
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in th*/
24
+ static VALUE
25
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
26
+ {
27
+ VALUE reduce;
28
+ ndfunc_arg_in_t ain[3] = {{cDF,0},{cDF,0},{sym_reduce,0}};
29
+ ndfunc_arg_out_t aout[1] = {{cDF,0}};
30
+ ndfunc_t ndf = { iter_<%=c_func%>, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT,
31
+ 3, 1, ain, aout };
32
+
33
+ if (argc<2) {
34
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=2)",argc);
35
+ }
36
+
37
+ reduce = nary_reduce_dimension(argc-2, argv+2, 2, argv, &ndf, 0);
38
+ return na_ndloop(&ndf, 3, argv[0], argv[1], reduce);
39
+ }
@@ -0,0 +1,43 @@
1
+ static void
2
+ iter_<%=c_func%>(na_loop_t *const lp)
3
+ {
4
+ size_t n;
5
+ char *p1, *p2, *p3;
6
+ ssize_t s1, s2;
7
+ double *opt = (double*)(lp->opt_ptr);
8
+
9
+ INIT_COUNTER(lp, n);
10
+ INIT_PTR(lp, 0, p1, s1);
11
+ INIT_PTR(lp, 1, p2, s2);
12
+ p3 = lp->args[2].ptr + lp->args[2].iter[0].pos;
13
+
14
+ *(double*)p3 = <%=func_name%>((double*)p1,s1/sizeof(double),
15
+ (double*)p2,s2/sizeof(double),n,opt[0]);
16
+ }
17
+
18
+ /*
19
+ <%=desc%>
20
+ @overload <%=name%>(<%=method_args%>, axis:nil, keepdims:false)
21
+ <% desc_param.each do |x|%>
22
+ <%=x%><% end %>
23
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
24
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in th*/
25
+ static VALUE
26
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
27
+ {
28
+ VALUE reduce;
29
+ double opt[1];
30
+ ndfunc_arg_in_t ain[3] = {{cDF,0},{cDF,0},{sym_reduce,0}};
31
+ ndfunc_arg_out_t aout[1] = {{cDF,0}};
32
+ ndfunc_t ndf = { iter_<%=c_func%>, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT,
33
+ 3, 1, ain, aout };
34
+
35
+ if (argc<3) {
36
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=3)",argc);
37
+ }
38
+
39
+ opt[0] = NUM2DBL(argv[2]);
40
+
41
+ reduce = nary_reduce_dimension(argc-3, argv+3, 2, argv, &ndf, 0);
42
+ return na_ndloop3(&ndf, opt, 3, argv[0], argv[1], reduce);
43
+ }
@@ -0,0 +1,44 @@
1
+ static void
2
+ iter_<%=c_func%>(na_loop_t *const lp)
3
+ {
4
+ size_t n;
5
+ char *p1, *p2, *p3;
6
+ ssize_t s1, s2;
7
+ double *opt = (double*)(lp->opt_ptr);
8
+
9
+ INIT_COUNTER(lp, n);
10
+ INIT_PTR(lp, 0, p1, s1);
11
+ INIT_PTR(lp, 1, p2, s2);
12
+ p3 = lp->args[2].ptr + lp->args[2].iter[0].pos;
13
+
14
+ *(double*)p3 = <%=func_name%>((double*)p1,s1/sizeof(double),
15
+ (double*)p2,s2/sizeof(double),n,opt[0],opt[1]);
16
+ }
17
+
18
+ /*
19
+ <%=desc%>
20
+ @overload <%=name%>(<%=method_args%>, axis:nil, keepdims:false)
21
+ <% desc_param.each do |x|%>
22
+ <%=x%><% end %>
23
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
24
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in th*/
25
+ static VALUE
26
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
27
+ {
28
+ VALUE reduce;
29
+ double opt[2];
30
+ ndfunc_arg_in_t ain[3] = {{cDF,0},{cDF,0},{sym_reduce,0}};
31
+ ndfunc_arg_out_t aout[1] = {{cDF,0}};
32
+ ndfunc_t ndf = { iter_<%=c_func%>, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT,
33
+ 3, 1, ain, aout };
34
+
35
+ if (argc<4) {
36
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=4)",argc);
37
+ }
38
+
39
+ opt[0] = NUM2DBL(argv[2]);
40
+ opt[1] = NUM2DBL(argv[3]);
41
+
42
+ reduce = nary_reduce_dimension(argc-4, argv+4, 2, argv, &ndf, 0);
43
+ return na_ndloop3(&ndf, opt, 3, argv[0], argv[1], reduce);
44
+ }
@@ -0,0 +1,37 @@
1
+ static void
2
+ iter_<%=c_func%>(na_loop_t *const lp)
3
+ {
4
+ size_t n;
5
+ char *p1, *p2, *p3;
6
+ ssize_t s1;
7
+
8
+ INIT_COUNTER(lp, n);
9
+ INIT_PTR(lp, 0, p1, s1);
10
+ p2 = lp->args[1].ptr + lp->args[1].iter[0].pos;
11
+ p3 = lp->args[2].ptr + lp->args[2].iter[0].pos;
12
+
13
+ <%=func_name%>((double*)p2,(double*)p3,(double*)p1,s1/sizeof(double),n);
14
+ }
15
+
16
+ /*
17
+ <%=desc%>
18
+ @overload <%=name%>(<%=method_args%>, axis:nil, keepdims:falsek)
19
+ <% desc_param.each do |x|%>
20
+ <%=x%><% end %>
21
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
22
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in th*/
23
+ static VALUE
24
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
25
+ {
26
+ VALUE reduce;
27
+ ndfunc_arg_in_t ain[2] = {{cDF,0},{sym_reduce,0}};
28
+ ndfunc_arg_out_t aout[2] = {{cDF,0},{cDF,0}};
29
+ ndfunc_t ndf = { iter_<%=c_func%>, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT,
30
+ 2, 2, ain, aout };
31
+
32
+ if (argc<1) {
33
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=1)",argc);
34
+ }
35
+ reduce = nary_reduce_dimension(argc-1, argv+1, 1, argv, &ndf, 0);
36
+ return na_ndloop(&ndf, 2, argv[0], reduce);
37
+ }
@@ -0,0 +1,67 @@
1
+ <% [64,32].each do |i| %>
2
+ #define idx_t int<%=i%>_t
3
+ static void
4
+ iter_<%=c_func%>_index<%=i%>(na_loop_t *const lp)
5
+ {
6
+ size_t n;
7
+ size_t min_idx, max_idx;
8
+ char *d_ptr, *i_ptr;
9
+ ssize_t d_step, i_step;
10
+ char *min_ptr, *max_ptr;
11
+
12
+ INIT_COUNTER(lp, n);
13
+ INIT_PTR(lp, 0, d_ptr, d_step);
14
+
15
+ <%=func_name%>(&min_idx,&max_idx,(double*)d_ptr,d_step/sizeof(double),n);
16
+
17
+ INIT_PTR(lp, 1, i_ptr, i_step);
18
+ min_ptr = NDL_PTR(lp,2);
19
+ max_ptr = NDL_PTR(lp,3);
20
+ *(idx_t*)min_ptr = *(idx_t*)(i_ptr + i_step * min_idx);
21
+ *(idx_t*)max_ptr = *(idx_t*)(i_ptr + i_step * max_idx);
22
+ }
23
+ #undef idx_t
24
+ <% end %>
25
+
26
+ /*
27
+ <%=desc%>
28
+ @overload <%=name%>() => [Integer, Integer]
29
+ @overload <%=name%>(axis:nil, keepdims:false) => 2-element array of Integer or Numo::Int32/64
30
+ <% desc_param.each do |x|%>
31
+ <%=x%><% end %>
32
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
33
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in th*/
34
+ static VALUE
35
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
36
+ {
37
+ narray_t *na;
38
+ VALUE idx, reduce;
39
+ ndfunc_arg_in_t ain[3] = {{cDF,0},{Qnil,0},{sym_reduce,0}};
40
+ ndfunc_arg_out_t aout[2] = {{0,0,0},{0,0,0}};
41
+ ndfunc_t ndf = { 0, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT,
42
+ 3,2, ain,aout };
43
+
44
+ if (argc<1) {
45
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=1)",argc);
46
+ }
47
+ GetNArray(argv[0],na);
48
+ if (na->ndim==0) {
49
+ return INT2FIX(0);
50
+ }
51
+ if (na->size > (~(u_int32_t)0)) {
52
+ aout[0].type = numo_cInt64;
53
+ aout[1].type = numo_cInt64;
54
+ idx = rb_narray_new(numo_cInt64, na->ndim, na->shape);
55
+ ndf.func = iter_<%=c_func%>_index64;
56
+ } else {
57
+ aout[0].type = numo_cInt32;
58
+ aout[1].type = numo_cInt32;
59
+ idx = rb_narray_new(numo_cInt32, na->ndim, na->shape);
60
+ ndf.func = iter_<%=c_func%>_index32;
61
+ }
62
+ rb_funcall(idx, rb_intern("seq"), 0);
63
+
64
+ reduce = nary_reduce_dimension(argc-1, argv+1, 1, argv, &ndf, 0);
65
+
66
+ return na_ndloop(&ndf, 3, argv[0], idx, reduce);
67
+ }
@@ -0,0 +1,46 @@
1
+ static void
2
+ iter_<%=c_func%>(na_loop_t *const lp)
3
+ {
4
+ size_t n;
5
+ char *p1, *p2, *p3;
6
+ ssize_t s1, s2;
7
+ double *opt = (double*)(lp->opt_ptr);
8
+
9
+ INIT_COUNTER(lp, n);
10
+ INIT_PTR(lp, 0, p1, s1);
11
+ INIT_PTR(lp, 1, p2, s2);
12
+ p3 = lp->args[2].ptr + lp->args[2].iter[0].pos;
13
+
14
+ *(double*)p3 = <%=func_name%>((double*)p1,s1/sizeof(double),
15
+ (double*)p2,s2/sizeof(double),n,opt);
16
+ }
17
+
18
+ /*
19
+ <%=desc%>
20
+ @overload <%=name%>(<%=method_args%>, axis:nil, keepdims:false)
21
+ <% desc_param.each do |x|%>
22
+ <%=x%><% end %>
23
+ @param [Numeric,Array,Range] axis (keyword) Axes along which the operation is performed.
24
+ @param [TrueClass] keepdims (keyword) If true, the reduced axes are left in th*/
25
+ static VALUE
26
+ <%=c_func%>(int argc, VALUE *argv, VALUE mod)
27
+ {
28
+ VALUE reduce, v, buf = 0;
29
+ narray_t *na;
30
+ double *opt;
31
+ ndfunc_arg_in_t ain[3] = {{cDF,0},{cDF,0},{sym_reduce,0}};
32
+ ndfunc_arg_out_t aout[1] = {{cDF,0}};
33
+ ndfunc_t ndf = { iter_<%=c_func%>, STRIDE_LOOP_NIP|NDF_FLAT_REDUCE|NDF_EXTRACT,
34
+ 3, 1, ain, aout };
35
+
36
+ if (argc<2) {
37
+ rb_raise(rb_eArgError,"wrong number of argument (%d for >=2)",argc);
38
+ }
39
+
40
+ GetNArray(argv[0],na);
41
+ opt = ALLOCV_N(double,buf,na->size*2); // todo: get loop size
42
+ reduce = nary_reduce_dimension(argc-2, argv+2, 2, argv, &ndf, 0);
43
+ v = na_ndloop3(&ndf, opt, 3, argv[0], argv[1], reduce);
44
+ ALLOCV_END(buf);
45
+ return v;
46
+ }
@@ -0,0 +1,20 @@
1
+ [["GSL_IS_EVEN (n)",
2
+ "This macro is the opposite of :macro:`GSL_IS_ODD`. It evaluates to 1 if :data:`n` is even and 0 if :data:`n` is odd. The argument :data:`n` must be of integer type. "],
3
+ ["GSL_IS_ODD (n)",
4
+ "This macro evaluates to 1 if :data:`n` is odd and 0 if :data:`n` is even. The argument :data:`n` must be of integer type. "],
5
+ ["GSL_MAX (a, b)",
6
+ "This macro returns the maximum of :data:`a` and :data:`b`. It is defined as :code:`((a) > (b) ? (a):(b))`. "],
7
+ ["GSL_MIN (a, b)",
8
+ "This macro returns the minimum of :data:`a` and :data:`b`. It is defined as :code:`((a) < (b) ? (a):(b))`. "],
9
+ ["GSL_MODE_DEFAULT", nil],
10
+ ["GSL_NAN",
11
+ "This macro contains the IEEE representation of the Not-a-Number symbol, :code:`NaN`. It is computed from the ratio :code:`0.0/0.0`. "],
12
+ ["GSL_NEGINF",
13
+ "This macro contains the IEEE representation of negative infinity, -\\infty. It is computed from the expression :code:`-1.0/0.0`. "],
14
+ ["GSL_POSINF",
15
+ "This macro contains the IEEE representation of positive infinity, +\\infty. It is computed from the expression :code:`+1.0/0.0`. "],
16
+ ["GSL_PREC_APPROX", nil],
17
+ ["GSL_PREC_DOUBLE", nil],
18
+ ["GSL_PREC_SINGLE", nil],
19
+ ["GSL_SIGN (x)",
20
+ "This macro returns the sign of :data:`x`. It is defined as :code:`((x) >= 0 ? 1 : -1)`. Note that with this definition the sign of zero is positive (regardless of its IEEE sign bit). "]]
@@ -0,0 +1,20 @@
1
+ [["GSL_IS_EVEN (n)",
2
+ "This macro is the opposite of :macro:`GSL_IS_ODD`. It evaluates to 1 if :data:`n` is even and 0 if :data:`n` is odd. The argument :data:`n` must be of integer type. "],
3
+ ["GSL_IS_ODD (n)",
4
+ "This macro evaluates to 1 if :data:`n` is odd and 0 if :data:`n` is even. The argument :data:`n` must be of integer type. "],
5
+ ["GSL_MAX (a, b)",
6
+ "This macro returns the maximum of :data:`a` and :data:`b`. It is defined as :code:`((a) > (b) ? (a):(b))`. "],
7
+ ["GSL_MIN (a, b)",
8
+ "This macro returns the minimum of :data:`a` and :data:`b`. It is defined as :code:`((a) < (b) ? (a):(b))`. "],
9
+ ["GSL_MODE_DEFAULT", nil],
10
+ ["GSL_NAN",
11
+ "This macro contains the IEEE representation of the Not-a-Number symbol, :code:`NaN`. It is computed from the ratio :code:`0.0/0.0`. "],
12
+ ["GSL_NEGINF",
13
+ "This macro contains the IEEE representation of negative infinity, -\\infty. It is computed from the expression :code:`-1.0/0.0`. "],
14
+ ["GSL_POSINF",
15
+ "This macro contains the IEEE representation of positive infinity, +\\infty. It is computed from the expression :code:`+1.0/0.0`. "],
16
+ ["GSL_PREC_APPROX", nil],
17
+ ["GSL_PREC_DOUBLE", nil],
18
+ ["GSL_PREC_SINGLE", nil],
19
+ ["GSL_SIGN (x)",
20
+ "This macro returns the sign of :data:`x`. It is defined as :code:`((x) >= 0 ? 1 : -1)`. Note that with this definition the sign of zero is positive (regardless of its IEEE sign bit). "]]
@@ -0,0 +1,20 @@
1
+ [["GSL_IS_EVEN (n)",
2
+ "This macro is the opposite of :macro:`GSL_IS_ODD`. It evaluates to 1 if :data:`n` is even and 0 if :data:`n` is odd. The argument :data:`n` must be of integer type. "],
3
+ ["GSL_IS_ODD (n)",
4
+ "This macro evaluates to 1 if :data:`n` is odd and 0 if :data:`n` is even. The argument :data:`n` must be of integer type. "],
5
+ ["GSL_MAX (a, b)",
6
+ "This macro returns the maximum of :data:`a` and :data:`b`. It is defined as :code:`((a) > (b) ? (a):(b))`. "],
7
+ ["GSL_MIN (a, b)",
8
+ "This macro returns the minimum of :data:`a` and :data:`b`. It is defined as :code:`((a) < (b) ? (a):(b))`. "],
9
+ ["GSL_MODE_DEFAULT", nil],
10
+ ["GSL_NAN",
11
+ "This macro contains the IEEE representation of the Not-a-Number symbol, :code:`NaN`. It is computed from the ratio :code:`0.0/0.0`. "],
12
+ ["GSL_NEGINF",
13
+ "This macro contains the IEEE representation of negative infinity, -\\infty. It is computed from the expression :code:`-1.0/0.0`. "],
14
+ ["GSL_POSINF",
15
+ "This macro contains the IEEE representation of positive infinity, +\\infty. It is computed from the expression :code:`+1.0/0.0`. "],
16
+ ["GSL_PREC_APPROX", nil],
17
+ ["GSL_PREC_DOUBLE", nil],
18
+ ["GSL_PREC_SINGLE", nil],
19
+ ["GSL_SIGN (x)",
20
+ "This macro returns the sign of :data:`x`. It is defined as :code:`((x) >= 0 ? 1 : -1)`. Note that with this definition the sign of zero is positive (regardless of its IEEE sign bit). "]]
@@ -0,0 +1,21 @@
1
+ [["GSL_MODE_DEFAULT", nil],
2
+ ["GSL_PREC_APPROX", nil],
3
+ ["GSL_PREC_DOUBLE", nil],
4
+ ["GSL_PREC_SINGLE", nil],
5
+ ["M_1_PI", "The reciprocal of pi, 1/\\pi "],
6
+ ["M_2_PI", "Twice the reciprocal of pi, 2/\\pi "],
7
+ ["M_2_SQRTPI", "Two divided by the square root of pi, 2/\\sqrt\\pi "],
8
+ ["M_E", "The base of exponentials, e "],
9
+ ["M_EULER", "Euler's constant, \\gamma "],
10
+ ["M_LN10", "The natural logarithm of ten, \\ln(10) "],
11
+ ["M_LN2", "The natural logarithm of two, \\ln(2) "],
12
+ ["M_LNPI", "The natural logarithm of pi, \\ln(\\pi) "],
13
+ ["M_LOG10E", "The base-10 logarithm of e, $\\log_{10}(e)$ \\log_10 (e) "],
14
+ ["M_LOG2E", "The base-2 logarithm of e, \\log_2 (e) "],
15
+ ["M_PI", "The constant pi, \\pi "],
16
+ ["M_PI_2", "Pi divided by two, \\pi/2 "],
17
+ ["M_PI_4", "Pi divided by four, \\pi/4 "],
18
+ ["M_SQRT1_2", "The square root of one-half, $\\sqrt{1/2}$ \\sqrt@{1/2@} "],
19
+ ["M_SQRT2", "The square root of two, \\sqrt 2 "],
20
+ ["M_SQRT3", "The square root of three, \\sqrt 3 "],
21
+ ["M_SQRTPI", "The square root of pi, \\sqrt\\pi "]]
@@ -0,0 +1,17 @@
1
+ COGEN=ruby erbpp_sys.rb
2
+ GENSRC=gsl_sys.c
3
+ GENDEPS=erbpp_sys.rb *_def.rb ../gen/*.rb ../gen/tmpl/*.c
4
+
5
+ src : $(GENSRC)
6
+
7
+ $(GENSRC) : $(GENDEPS)
8
+ $(COGEN) > $@
9
+
10
+ doc : $(GENSRC)
11
+ yard doc $(GENSRC)
12
+
13
+ clean: cleansrc cleandoc
14
+ cleansrc:
15
+ -$(Q)$(RM) $(GENSRC)
16
+ cleandoc:
17
+ -$(Q)$(RM_RF) doc .yardoc
@@ -0,0 +1,75 @@
1
+ [["GSL_EIGEN_SORT_VAL_ASC", 0, ""],
2
+ ["GSL_EIGEN_SORT_VAL_DESC", 1, ""],
3
+ ["GSL_EIGEN_SORT_ABS_ASC", 2, ""],
4
+ ["GSL_EIGEN_SORT_ABS_DESC", 3, ""],
5
+ ["GSL_SUCCESS", 0, ""],
6
+ ["GSL_FAILURE", -1, ""],
7
+ ["GSL_CONTINUE", -2, "iteration has not converged"],
8
+ ["GSL_EDOM", 1, "input domain error, e.g sqrt(-1)"],
9
+ ["GSL_ERANGE", 2, "output range error, e.g. exp(1e100)"],
10
+ ["GSL_EFAULT", 3, "invalid pointer"],
11
+ ["GSL_EINVAL", 4, "invalid argument supplied by user"],
12
+ ["GSL_EFAILED", 5, "generic failure"],
13
+ ["GSL_EFACTOR", 6, "factorization failed"],
14
+ ["GSL_ESANITY", 7, "sanity check failed - shouldn't happen"],
15
+ ["GSL_ENOMEM", 8, "malloc failed"],
16
+ ["GSL_EBADFUNC", 9, "problem with user-supplied function"],
17
+ ["GSL_ERUNAWAY", 10, "iterative process is out of control"],
18
+ ["GSL_EMAXITER", 11, "exceeded max number of iterations"],
19
+ ["GSL_EZERODIV", 12, "tried to divide by zero"],
20
+ ["GSL_EBADTOL", 13, "user specified an invalid tolerance"],
21
+ ["GSL_ETOL", 14, "failed to reach the specified tolerance"],
22
+ ["GSL_EUNDRFLW", 15, "underflow"],
23
+ ["GSL_EOVRFLW", 16, "overflow"],
24
+ ["GSL_ELOSS", 17, "loss of accuracy"],
25
+ ["GSL_EROUND", 18, "failed because of roundoff error"],
26
+ ["GSL_EBADLEN", 19, "matrix, vector lengths are not conformant"],
27
+ ["GSL_ENOTSQR", 20, "matrix not square"],
28
+ ["GSL_ESING", 21, "apparent singularity detected"],
29
+ ["GSL_EDIVERGE", 22, "integral or series is divergent"],
30
+ ["GSL_EUNSUP", 23, "requested feature is not supported by the hardware"],
31
+ ["GSL_EUNIMPL", 24, "requested feature not (yet) implemented"],
32
+ ["GSL_ECACHE", 25, "cache limit exceeded"],
33
+ ["GSL_ETABLE", 26, "table limit exceeded"],
34
+ ["GSL_ENOPROG", 27, "iteration is not making progress towards solution"],
35
+ ["GSL_ENOPROGJ", 28, "jacobian evaluations are not improving the solution"],
36
+ ["GSL_ETOLF", 29, "cannot reach the specified tolerance in F"],
37
+ ["GSL_ETOLX", 30, "cannot reach the specified tolerance in X"],
38
+ ["GSL_ETOLG", 31, "cannot reach the specified tolerance in gradient"],
39
+ ["GSL_EOF", 32, "end of file"],
40
+ ["GSL_MESSAGE_MASK_A", 1, ""],
41
+ ["GSL_MESSAGE_MASK_B", 2, ""],
42
+ ["GSL_MESSAGE_MASK_C", 4, ""],
43
+ ["GSL_MESSAGE_MASK_D", 8, ""],
44
+ ["GSL_MESSAGE_MASK_E", 16, ""],
45
+ ["GSL_MESSAGE_MASK_F", 32, ""],
46
+ ["GSL_MESSAGE_MASK_G", 64, ""],
47
+ ["GSL_MESSAGE_MASK_H", 128, ""],
48
+ ["GSL_IEEE_TYPE_NAN", 1, ""],
49
+ ["GSL_IEEE_TYPE_INF", 2, ""],
50
+ ["GSL_IEEE_TYPE_NORMAL", 3, ""],
51
+ ["GSL_IEEE_TYPE_DENORMAL", 4, ""],
52
+ ["GSL_IEEE_TYPE_ZERO", 5, ""],
53
+ ["GSL_IEEE_SINGLE_PRECISION", 1, ""],
54
+ ["GSL_IEEE_DOUBLE_PRECISION", 2, ""],
55
+ ["GSL_IEEE_EXTENDED_PRECISION", 3, ""],
56
+ ["GSL_IEEE_ROUND_TO_NEAREST", 1, ""],
57
+ ["GSL_IEEE_ROUND_DOWN", 2, ""],
58
+ ["GSL_IEEE_ROUND_UP", 3, ""],
59
+ ["GSL_IEEE_ROUND_TO_ZERO", 4, ""],
60
+ ["GSL_IEEE_MASK_INVALID", 1, ""],
61
+ ["GSL_IEEE_MASK_DENORMALIZED", 2, ""],
62
+ ["GSL_IEEE_MASK_DIVISION_BY_ZERO", 4, ""],
63
+ ["GSL_IEEE_MASK_OVERFLOW", 8, ""],
64
+ ["GSL_IEEE_MASK_UNDERFLOW", 16, ""],
65
+ ["GSL_IEEE_MASK_ALL", 31, ""],
66
+ ["GSL_IEEE_TRAP_INEXACT", 32, ""],
67
+ ["GSL_INTEG_GAUSS15", 1, "15 point Gauss-Kronrod rule"],
68
+ ["GSL_INTEG_GAUSS21", 2, "21 point Gauss-Kronrod rule"],
69
+ ["GSL_INTEG_GAUSS31", 3, "31 point Gauss-Kronrod rule"],
70
+ ["GSL_INTEG_GAUSS41", 4, "41 point Gauss-Kronrod rule"],
71
+ ["GSL_INTEG_GAUSS51", 5, "51 point Gauss-Kronrod rule"],
72
+ ["GSL_INTEG_GAUSS61", 6, "61 point Gauss-Kronrod rule"],
73
+ ["GSL_VEGAS_MODE_IMPORTANCE", 1, ""],
74
+ ["GSL_VEGAS_MODE_IMPORTANCE_ONLY", 0, ""],
75
+ ["GSL_VEGAS_MODE_STRATIFIED", -1, ""]]