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,101 @@
1
+ require_relative "../gen/erbpp_gsl"
2
+ require_relative "parse_spmatrix"
3
+
4
+ class_list = [
5
+ ["SpMatrix","spmatrix",[]],
6
+ ["SpBlas","spblas",[]],
7
+ ["IterSolve","splinalg_itersolve",[]],
8
+ ]
9
+ list = {}
10
+ ErbppGsl.read_func_pattern(*class_list.map{|name,base|
11
+ [/gsl_#{base}_/, list[name]=[]]
12
+ })
13
+ const_list = ErbppGsl.read_const
14
+
15
+ DefLib.new do
16
+ set line_number: true
17
+ set erb_dir: %w[tmpl ../gen/tmpl]
18
+ set erb_suffix: ".c"
19
+ set ns_var: "mG"
20
+
21
+ ErbPP.new(self,"cast_1d_contiguous")
22
+ ErbPP.new(self,"cast_2d_contiguous")
23
+
24
+ cname = "SpMatrix"
25
+ cbase = cname.downcase
26
+ set file_name: "gsl_#{cname}.c"
27
+ set include_files: %w[gsl/gsl_spmatrix.h gsl/gsl_spblas.h gsl/gsl_splinalg.h]
28
+ set lib_name: cname.downcase
29
+
30
+ DefSpMatrix.new(self) do
31
+ name = cname
32
+ base = cbase
33
+ set name: base
34
+ set class_name: name
35
+ set class_var: "c"+name
36
+ set full_class_name: "Numo::GSL::"+name
37
+ set struct: "gsl_"+base
38
+
39
+ const_list.each do |a|
40
+ m = a[0].sub(/^GSL_SPMATRIX_/,"")
41
+ v = "INT2FIX(#{a[0]})"
42
+ def_const(m, v, desc:a[1]||"")
43
+ end
44
+
45
+ undef_alloc_func
46
+ list[name].each do |h|
47
+ check_func(h)
48
+ end
49
+ end
50
+
51
+ DefSpBlas.new(self) do
52
+ name = "SpBlas"
53
+ base = name.downcase
54
+ set name: base
55
+ set module_name: name
56
+ set module_var: "m"+name
57
+ set full_module_name: "Numo::GSL::"+name
58
+ set struct: "gsl_spmatrix"
59
+
60
+ set class_name: cname
61
+ set class_var: "c"+cname
62
+ set full_class_name: "Numo::GSL::"+cname
63
+ set data_type_var: cbase+"_data_type"
64
+
65
+ def_const "NOTRANS", "INT2FIX(CblasNoTrans)"
66
+ def_const "TRANS", "INT2FIX(CblasTrans)"
67
+
68
+ list[name].each do |h|
69
+ check_func(h)
70
+ end
71
+ end
72
+
73
+ def_module do
74
+ name = "SpLinalg"
75
+ base = name.downcase
76
+ set name: base
77
+ set module_name: name
78
+ set module_var: "m"+name
79
+ set full_module_name: "Numo::GSL::"+name
80
+
81
+ DefIterSolve.new(self) do
82
+ set ns_var: "mSpLinalg"
83
+ name = "IterSolve"
84
+ base = "splinalg_itersolve"
85
+ set name: base
86
+ set class_name: name
87
+ set class_var: "c"+name
88
+ set full_class_name: "Numo::GSL::SpLinalg::"+name
89
+ set struct: "gsl_"+base
90
+
91
+ set sm_struct: "gsl_"+cbase
92
+ set sm_data_type_var: cbase+"_data_type"
93
+
94
+ undef_alloc_func
95
+ list[name].each do |h|
96
+ check_func(h)
97
+ end
98
+ end
99
+ end
100
+
101
+ end.run
@@ -0,0 +1,9 @@
1
+ require_relative '../extconf_gsl.rb'
2
+
3
+ # source file to compile
4
+ srcs = %w(
5
+ gsl_spmatrix
6
+ )
7
+ $objs = srcs.collect{|i| i+".o"}
8
+
9
+ create_makefile('numo/gsl/spmatrix')
@@ -0,0 +1,297 @@
1
+ [{:func_name=>"gsl_spblas_dgemm",
2
+ :func_type=>"int",
3
+ :args=>
4
+ [["const double", "alpha"],
5
+ ["const gsl_spmatrix *", "A"],
6
+ ["const gsl_spmatrix *", "B"],
7
+ ["gsl_spmatrix *", "C"]],
8
+ :desc=>
9
+ "This function computes the sparse matrix-matrix product\n" +
10
+ "C = \\alpha A B. The matrices must be in compressed format."},
11
+ {:func_name=>"gsl_spblas_dgemv",
12
+ :func_type=>"int",
13
+ :args=>
14
+ [["const CBLAS_TRANSPOSE_t", "TransA"],
15
+ ["const double", "alpha"],
16
+ ["const gsl_spmatrix *", "A"],
17
+ ["const gsl_vector *", "x"],
18
+ ["const double", "beta"],
19
+ ["gsl_vector *", "y"]],
20
+ :desc=>
21
+ "This function computes the matrix-vector product and sum\n" +
22
+ "y \\leftarrow \\alpha op(A) x + \\beta y, where\n" +
23
+ "op(A) = A, A^T for TransA = CblasNoTrans,\n" +
24
+ "CblasTrans. In-place computations are not supported, so\n" +
25
+ "x and y must be distinct vectors.\n" +
26
+ "The matrix A may be in triplet or compressed format."},
27
+ {:func_name=>"gsl_splinalg_itersolve_alloc",
28
+ :func_type=>"gsl_splinalg_itersolve *",
29
+ :args=>
30
+ [["const gsl_splinalg_itersolve_type *", "T"],
31
+ ["const size_t", "n"],
32
+ ["const size_t", "m"]],
33
+ :desc=>
34
+ "This function allocates a workspace for the iterative solution of\n" +
35
+ "n-by-n sparse matrix systems. The iterative solver type\n" +
36
+ "is specified by T. The argument m specifies the size\n" +
37
+ "of the solution candidate subspace {\\cal K}_m. The dimension\n" +
38
+ "m may be set to 0 in which case a reasonable default value is used."},
39
+ {:func_name=>"gsl_splinalg_itersolve_free",
40
+ :func_type=>"void",
41
+ :args=>[["gsl_splinalg_itersolve *", "w"]],
42
+ :desc=>"This function frees the memory associated with the workspace w."},
43
+ {:func_name=>"gsl_splinalg_itersolve_iterate",
44
+ :func_type=>"int",
45
+ :args=>
46
+ [["const gsl_spmatrix *", "A"],
47
+ ["const gsl_vector *", "b"],
48
+ ["const double", "tol"],
49
+ ["gsl_vector *", "x"],
50
+ ["gsl_splinalg_itersolve *", "w"]],
51
+ :desc=>
52
+ "This function performs one iteration of the iterative method for\n" +
53
+ "the sparse linear system specfied by the matrix A, right hand\n" +
54
+ "side vector b and solution vector x. On input, x\n" +
55
+ "must be set to an initial guess for the solution. On output,\n" +
56
+ "x is updated to give the current solution estimate. The\n" +
57
+ "parameter tol specifies the relative tolerance between the residual\n" +
58
+ "norm and norm of b in order to check for convergence.\n" +
59
+ "When the following condition is satisfied:\n" +
60
+ "|| A x - b || <= tol * || b ||\n" +
61
+ "the method has converged, the function returns GSL_SUCCESS and\n" +
62
+ "the final solution is provided in x. Otherwise, the function\n" +
63
+ "returns GSL_CONTINUE to signal that more iterations are\n" +
64
+ "required. Here, || \\cdot || represents the Euclidean norm.\n" +
65
+ "The input matrix A may be in triplet or compressed column\n" +
66
+ "format."},
67
+ {:func_name=>"gsl_splinalg_itersolve_name",
68
+ :func_type=>"const char *",
69
+ :args=>[["const gsl_splinalg_itersolve *", "w"]],
70
+ :desc=>"This function returns a string pointer to the name of the solver."},
71
+ {:func_name=>"gsl_splinalg_itersolve_normr",
72
+ :func_type=>"double",
73
+ :args=>[["const gsl_splinalg_itersolve *", "w"]],
74
+ :desc=>
75
+ "This function returns the current residual norm\n" +
76
+ "||r|| = ||A x - b||, which is updated after each call to\n" +
77
+ "gsl_splinalg_itersolve_iterate."},
78
+ {:func_name=>"gsl_spmatrix_add",
79
+ :func_type=>"int",
80
+ :args=>
81
+ [["gsl_spmatrix *", "c"],
82
+ ["const gsl_spmatrix *", "a"],
83
+ ["const gsl_spmatrix *", "b"]],
84
+ :desc=>
85
+ "This function computes the sum c = a + b. The three matrices must\n" +
86
+ "have the same dimensions and be stored in a compressed format."},
87
+ {:func_name=>"gsl_spmatrix_alloc",
88
+ :func_type=>"gsl_spmatrix *",
89
+ :args=>[["const size_t", "n1"], ["const size_t", "n2"]],
90
+ :desc=>
91
+ "This function allocates a sparse matrix of size n1-by-n2 and\n" +
92
+ "initializes it to all zeros. If the size of the matrix is not known at allocation\n" +
93
+ "time, both n1 and n2 may be set to 1, and they will automatically\n" +
94
+ "grow as elements are added to the matrix. This function sets the\n" +
95
+ "matrix to the triplet representation, which is the easiest for adding\n" +
96
+ "and accessing matrix elements. This function tries to make a reasonable guess\n" +
97
+ "for the number of non-zero elements (nzmax) which will be added to the matrix by\n" +
98
+ "assuming a sparse density of 10\\%. The function\n" +
99
+ "gsl_spmatrix_alloc_nzmax can be used if this number is known more\n" +
100
+ "accurately. The workspace is of size O(nzmax)."},
101
+ {:func_name=>"gsl_spmatrix_alloc_nzmax",
102
+ :func_type=>"gsl_spmatrix *",
103
+ :args=>
104
+ [["const size_t", "n1"],
105
+ ["const size_t", "n2"],
106
+ ["const size_t", "nzmax"],
107
+ ["const size_t", "sptype"]],
108
+ :desc=>
109
+ "This function allocates a sparse matrix of size n1-by-n2 and\n" +
110
+ "initializes it to all zeros. If the size of the matrix is not known at allocation\n" +
111
+ "time, both n1 and n2 may be set to 1, and they will automatically\n" +
112
+ "grow as elements are added to the matrix. The parameter nzmax specifies\n" +
113
+ "the maximum number of non-zero elements which will be added to the matrix.\n" +
114
+ "It does not need to be precisely known in advance, since storage space will \n" +
115
+ "automatically grow using gsl_spmatrix_realloc if nzmax is not\n" +
116
+ "large enough. Accurate knowledge of this parameter reduces the number of\n" +
117
+ "reallocation calls required. The parameter sptype specifies the\n" +
118
+ "storage format of the sparse matrix. Possible values are\n" +
119
+ "The allocated gsl_spmatrix structure is of size O(nzmax)."},
120
+ {:func_name=>"gsl_spmatrix_ccs",
121
+ :func_type=>"gsl_spmatrix *",
122
+ :args=>[["const gsl_spmatrix *", "T"]],
123
+ :desc=>
124
+ "This function creates a sparse matrix in compressed column format\n" +
125
+ "from the input sparse matrix T which must be in triplet format.\n" +
126
+ "A pointer to a newly allocated matrix is returned. The calling function\n" +
127
+ "should free the newly allocated matrix when it is no longer needed."},
128
+ {:func_name=>"gsl_spmatrix_crs",
129
+ :func_type=>"gsl_spmatrix *",
130
+ :args=>[["const gsl_spmatrix *", "T"]],
131
+ :desc=>
132
+ "This function creates a sparse matrix in compressed row format\n" +
133
+ "from the input sparse matrix T which must be in triplet format.\n" +
134
+ "A pointer to a newly allocated matrix is returned. The calling function\n" +
135
+ "should free the newly allocated matrix when it is no longer needed."},
136
+ {:func_name=>"gsl_spmatrix_d2sp",
137
+ :func_type=>"int",
138
+ :args=>[["gsl_spmatrix *", "S"], ["const gsl_matrix *", "A"]],
139
+ :desc=>
140
+ "This function converts the dense matrix A into sparse triplet format\n" +
141
+ "and stores the result in S."},
142
+ {:func_name=>"gsl_spmatrix_equal",
143
+ :func_type=>"int",
144
+ :args=>[["const gsl_spmatrix *", "a"], ["const gsl_spmatrix *", "b"]],
145
+ :desc=>
146
+ "This function returns 1 if the matrices a and b are equal (by comparison of\n" +
147
+ "element values) and 0 otherwise. The matrices a and b must be in the same\n" +
148
+ "sparse storage format for comparison."},
149
+ {:func_name=>"gsl_spmatrix_fprintf",
150
+ :func_type=>"int",
151
+ :args=>
152
+ [["FILE *", "stream"],
153
+ ["const gsl_spmatrix *", "m"],
154
+ ["const char *", "format"]],
155
+ :desc=>
156
+ "This function writes the elements of the matrix m line-by-line to\n" +
157
+ "the stream stream using the format specifier format, which\n" +
158
+ "should be one of the %g, %e or %f formats for\n" +
159
+ "floating point numbers. The function returns 0 for success and\n" +
160
+ "GSL_EFAILED if there was a problem writing to the file. The\n" +
161
+ "input matrix m may be in any storage format, and the output file\n" +
162
+ "will be written in MatrixMarket format."},
163
+ {:func_name=>"gsl_spmatrix_fread",
164
+ :func_type=>"int",
165
+ :args=>[["FILE *", "stream"], ["gsl_spmatrix *", "m"]],
166
+ :desc=>
167
+ "This function reads into the matrix m from the open stream\n" +
168
+ "stream in binary format. The matrix m must be preallocated\n" +
169
+ "with the correct storage format, dimensions and have a sufficiently large nzmax\n" +
170
+ "in order to read in all matrix elements, otherwise GSL_EBADLEN\n" +
171
+ "is returned. The return value is 0 for success and\n" +
172
+ "GSL_EFAILED if there was a problem reading from the file. The\n" +
173
+ "data is assumed to have been written in the native binary format on the\n" +
174
+ "same architecture."},
175
+ {:func_name=>"gsl_spmatrix_free",
176
+ :func_type=>"void",
177
+ :args=>[["gsl_spmatrix *", "m"]],
178
+ :desc=>
179
+ "This function frees the memory associated with the sparse matrix m."},
180
+ {:func_name=>"gsl_spmatrix_fscanf",
181
+ :func_type=>"gsl_spmatrix *",
182
+ :args=>[["FILE *", "stream"]],
183
+ :desc=>
184
+ "This function reads sparse matrix data in the MatrixMarket format\n" +
185
+ "from the stream stream and stores it in a newly allocated matrix\n" +
186
+ "which is returned in triplet format. The function returns 0 for success and\n" +
187
+ "GSL_EFAILED if there was a problem reading from the file. The\n" +
188
+ "user should free the returned matrix when it is no longer needed."},
189
+ {:func_name=>"gsl_spmatrix_fwrite",
190
+ :func_type=>"int",
191
+ :args=>[["FILE *", "stream"], ["const gsl_spmatrix *", "m"]],
192
+ :desc=>
193
+ "This function writes the elements of the matrix m to the stream\n" +
194
+ "stream in binary format. The return value is 0 for success and\n" +
195
+ "GSL_EFAILED if there was a problem writing to the file. Since the\n" +
196
+ "data is written in the native binary format it may not be portable\n" +
197
+ "between different architectures."},
198
+ {:func_name=>"gsl_spmatrix_get",
199
+ :func_type=>"double",
200
+ :args=>
201
+ [["const gsl_spmatrix *", "m"],
202
+ ["const size_t", "i"],
203
+ ["const size_t", "j"]],
204
+ :desc=>
205
+ "This function returns element (i,j) of the matrix m.\n" +
206
+ "The matrix may be in triplet or compressed format."},
207
+ {:func_name=>"gsl_spmatrix_memcpy",
208
+ :func_type=>"int",
209
+ :args=>[["gsl_spmatrix *", "dest"], ["const gsl_spmatrix *", "src"]],
210
+ :desc=>
211
+ "This function copies the elements of the sparse matrix src into\n" +
212
+ "dest. The two matrices must have the same dimensions and be in the\n" +
213
+ "same storage format."},
214
+ {:func_name=>"gsl_spmatrix_minmax",
215
+ :func_type=>"int",
216
+ :args=>
217
+ [["const gsl_spmatrix *", "m"],
218
+ ["double *", "min_out"],
219
+ ["double *", "max_out"]],
220
+ :desc=>
221
+ "This function returns the minimum and maximum elements of the matrix\n" +
222
+ "m, storing them in min_out and max_out, and searching\n" +
223
+ "only the non-zero values."},
224
+ {:func_name=>"gsl_spmatrix_nnz",
225
+ :func_type=>"size_t",
226
+ :args=>[["const gsl_spmatrix *", "m"]],
227
+ :desc=>"This function returns the number of non-zero elements in m."},
228
+ {:func_name=>"gsl_spmatrix_ptr",
229
+ :func_type=>"double *",
230
+ :args=>
231
+ [["gsl_spmatrix *", "m"], ["const size_t", "i"], ["const size_t", "j"]],
232
+ :desc=>
233
+ "This function returns a pointer to the (i,j) element of the matrix m.\n" +
234
+ "If the (i,j) element is not explicitly stored in the matrix,\n" +
235
+ "a null pointer is returned."},
236
+ {:func_name=>"gsl_spmatrix_realloc",
237
+ :func_type=>"int",
238
+ :args=>[["const size_t", "nzmax"], ["gsl_spmatrix *", "m"]],
239
+ :desc=>
240
+ "This function reallocates the storage space for m to accomodate\n" +
241
+ "nzmax non-zero elements. It is typically called internally by\n" +
242
+ "gsl_spmatrix_set if the user wants to add more elements to the\n" +
243
+ "sparse matrix than the previously specified nzmax."},
244
+ {:func_name=>"gsl_spmatrix_scale",
245
+ :func_type=>"int",
246
+ :args=>[["gsl_spmatrix *", "m"], ["const double", "x"]],
247
+ :desc=>
248
+ "This function scales all elements of the matrix m by the constant\n" +
249
+ "factor x. The result m(i,j) \\leftarrow x m(i,j) is stored in m."},
250
+ {:func_name=>"gsl_spmatrix_set",
251
+ :func_type=>"int",
252
+ :args=>
253
+ [["gsl_spmatrix *", "m"],
254
+ ["const size_t", "i"],
255
+ ["const size_t", "j"],
256
+ ["const double", "x"]],
257
+ :desc=>
258
+ "This function sets element (i,j) of the matrix m to\n" +
259
+ "the value x. The matrix must be in triplet representation."},
260
+ {:func_name=>"gsl_spmatrix_set_zero",
261
+ :func_type=>"int",
262
+ :args=>[["gsl_spmatrix *", "m"]],
263
+ :desc=>
264
+ "This function sets (or resets) all the elements of the matrix m to zero."},
265
+ {:func_name=>"gsl_spmatrix_sp2d",
266
+ :func_type=>"int",
267
+ :args=>[["gsl_matrix *", "A"], ["const gsl_spmatrix *", "S"]],
268
+ :desc=>
269
+ "This function converts the sparse matrix S into a dense matrix and\n" +
270
+ "stores the result in A. S must be in triplet format."},
271
+ {:func_name=>"gsl_spmatrix_transpose",
272
+ :func_type=>"int",
273
+ :args=>[["gsl_spmatrix *", "m"]],
274
+ :desc=>
275
+ "This function replaces the matrix m by its transpose,\n" +
276
+ "preserving the storage format of the input matrix. Currently,\n" +
277
+ "only triplet matrix inputs are supported."},
278
+ {:func_name=>"gsl_spmatrix_transpose2",
279
+ :func_type=>"int",
280
+ :args=>[["gsl_spmatrix *", "m"]],
281
+ :desc=>
282
+ "This function replaces the matrix m by its transpose, but\n" +
283
+ "changes the storage format for compressed matrix inputs. Since\n" +
284
+ "compressed column storage is the transpose of compressed row storage,\n" +
285
+ "this function simply converts a CCS matrix to CRS and vice versa.\n" +
286
+ "This is the most efficient way to transpose a compressed storage\n" +
287
+ "matrix, but the user should note that the storage format of their\n" +
288
+ "compressed matrix will change on output. For triplet matrices,\n" +
289
+ "the output matrix is also in triplet storage."},
290
+ {:func_name=>"gsl_spmatrix_transpose_memcpy",
291
+ :func_type=>"int",
292
+ :args=>[["gsl_spmatrix *", "dest"], ["const gsl_spmatrix *", "src"]],
293
+ :desc=>
294
+ "This function copies the transpose of the sparse matrix src into\n" +
295
+ "dest. The dimensions of dest must match the transpose of the\n" +
296
+ "matrix src. Also, both matrices must use the same sparse storage\n" +
297
+ "format."}]