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,216 @@
1
+ [{:func_name=>"gsl_multilarge_linear_L_decomp",
2
+ :func_type=>"int",
3
+ :args=>[["gsl_matrix *", "L"], ["gsl_vector *", "tau"]],
4
+ :desc=>
5
+ "This function calculates the QR decomposition of the m-by-p\n" +
6
+ "regularization matrix L. L must have m \\ge p. On output,\n" +
7
+ "the Householder scalars are stored in the vector tau of size p.\n" +
8
+ "These outputs will be used by gsl_multilarge_linear_wstdform2 to complete the\n" +
9
+ "transformation to standard form."},
10
+ {:func_name=>"gsl_multilarge_linear_accumulate",
11
+ :func_type=>"int",
12
+ :args=>
13
+ [["gsl_matrix *", "X"],
14
+ ["gsl_vector *", "y"],
15
+ ["gsl_multilarge_linear_workspace *", "w"]],
16
+ :desc=>
17
+ "This function accumulates the standard form block (X,y) into the\n" +
18
+ "current least squares system. X and y have the same number\n" +
19
+ "of rows, which can be arbitrary. X must have p columns.\n" +
20
+ "For the TSQR method, X and y are destroyed on output.\n" +
21
+ "For the normal equations method, they are both unchanged."},
22
+ {:func_name=>"gsl_multilarge_linear_alloc",
23
+ :func_type=>"gsl_multilarge_linear_workspace *",
24
+ :args=>[["const gsl_multilarge_linear_type *", "T"], ["const size_t", "p"]],
25
+ :desc=>
26
+ "This function allocates a workspace for solving large linear least squares\n" +
27
+ "systems. The least squares matrix X has p columns,\n" +
28
+ "but may have any number of rows.\n" +
29
+ ".. type:: gsl_multilarge_linear_type"},
30
+ {:func_name=>"gsl_multilarge_linear_free",
31
+ :func_type=>"void",
32
+ :args=>[["gsl_multilarge_linear_workspace *", "w"]],
33
+ :desc=>
34
+ "This function frees the memory associated with the\n" + "workspace w."},
35
+ {:func_name=>"gsl_multilarge_linear_genform1",
36
+ :func_type=>"int",
37
+ :args=>
38
+ [["const gsl_vector *", "L"],
39
+ ["const gsl_vector *", "cs"],
40
+ ["gsl_vector *", "c"],
41
+ ["gsl_multilarge_linear_workspace *", "work"]],
42
+ :desc=>
43
+ "After a regularized system has been solved with\n" +
44
+ "L = \\diag(\\l_0,\\l_1,...,\\l_{p-1}),\n" +
45
+ "this function backtransforms the standard form solution vector cs\n" +
46
+ "to recover the solution vector of the original problem c. The\n" +
47
+ "diagonal matrix elements l_i are provided in\n" +
48
+ "the vector L. It is allowed to have c = cs for an\n" +
49
+ "in-place transform."},
50
+ {:func_name=>"gsl_multilarge_linear_genform2",
51
+ :func_type=>"int",
52
+ :args=>
53
+ [["const gsl_matrix *", "LQR"],
54
+ ["const gsl_vector *", "Ltau"],
55
+ ["const gsl_vector *", "cs"],
56
+ ["gsl_vector *", "c"],
57
+ ["gsl_multilarge_linear_workspace *", "work"]],
58
+ :desc=>
59
+ "After a regularized system has been solved with a regularization matrix L,\n" +
60
+ "specified by (LQR, Ltau), this function backtransforms the standard form\n" +
61
+ "solution cs\n" +
62
+ "to recover the solution vector of the original problem, which is stored in c,\n" +
63
+ "of length p."},
64
+ {:func_name=>"gsl_multilarge_linear_lcurve",
65
+ :func_type=>"int",
66
+ :args=>
67
+ [["gsl_vector *", "reg_param"],
68
+ ["gsl_vector *", "rho"],
69
+ ["gsl_vector *", "eta"],
70
+ ["gsl_multilarge_linear_workspace *", "work"]],
71
+ :desc=>
72
+ "This function computes the L-curve for a large least squares system\n" +
73
+ "after it has been fully accumulated into the workspace work.\n" +
74
+ "The output vectors reg_param, rho, and eta must all\n" +
75
+ "be the same size, and will contain the regularization parameters\n" +
76
+ "\\lambda_i, residual norms ||y - X c_i||, and solution\n" +
77
+ "norms || L c_i || which compose the L-curve, where c_i\n" +
78
+ "is the regularized solution vector corresponding to \\lambda_i.\n" +
79
+ "The user may determine the number of points on the L-curve by\n" +
80
+ "adjusting the size of these input arrays. For the TSQR method,\n" +
81
+ "the regularization parameters \\lambda_i are estimated from the\n" +
82
+ "singular values of the triangular R factor. For the normal\n" +
83
+ "equations method, they are estimated from the eigenvalues of the\n" +
84
+ "X^T X matrix."},
85
+ {:func_name=>"gsl_multilarge_linear_name",
86
+ :func_type=>"const char *",
87
+ :args=>[["gsl_multilarge_linear_workspace *", "w"]],
88
+ :desc=>
89
+ "This function returns a string pointer to the name\n" +
90
+ "of the multilarge solver."},
91
+ {:func_name=>"gsl_multilarge_linear_rcond",
92
+ :func_type=>"int",
93
+ :args=>
94
+ [["double *", "rcond"], ["gsl_multilarge_linear_workspace *", "work"]],
95
+ :desc=>
96
+ "This function computes the reciprocal condition number, stored in\n" +
97
+ "rcond, of the least squares matrix after it has been accumulated\n" +
98
+ "into the workspace work. For the TSQR algorithm, this is\n" +
99
+ "accomplished by calculating the SVD of the R factor, which\n" +
100
+ "has the same singular values as the matrix X. For the normal\n" +
101
+ "equations method, this is done by computing the eigenvalues of\n" +
102
+ "X^T X, which could be inaccurate for ill-conditioned matrices\n" +
103
+ "X."},
104
+ {:func_name=>"gsl_multilarge_linear_reset",
105
+ :func_type=>"int",
106
+ :args=>[["gsl_multilarge_linear_workspace *", "w"]],
107
+ :desc=>
108
+ "This function resets the workspace w so\n" +
109
+ "it can begin to accumulate a new least squares\n" +
110
+ "system."},
111
+ {:func_name=>"gsl_multilarge_linear_solve",
112
+ :func_type=>"int",
113
+ :args=>
114
+ [["const double", "lambda"],
115
+ ["gsl_vector *", "c"],
116
+ ["double *", "rnorm"],
117
+ ["double *", "snorm"],
118
+ ["gsl_multilarge_linear_workspace *", "w"]],
119
+ :desc=>
120
+ "After all blocks (X_i,y_i) have been accumulated into\n" +
121
+ "the large least squares system, this function will compute\n" +
122
+ "the solution vector which is stored in c on output.\n" +
123
+ "The regularization parameter \\lambda is provided in\n" +
124
+ "lambda. On output, rnorm contains the residual norm\n" +
125
+ "||y - X c||_W and snorm contains the solution\n" +
126
+ "norm ||L c||."},
127
+ {:func_name=>"gsl_multilarge_linear_stdform1",
128
+ :func_type=>"int",
129
+ :args=>
130
+ [["const gsl_vector *", "L"],
131
+ ["const gsl_matrix *", "X"],
132
+ ["const gsl_vector *", "y"],
133
+ ["gsl_matrix *", "Xs"],
134
+ ["gsl_vector *", "ys"],
135
+ ["gsl_multilarge_linear_workspace *", "work"]],
136
+ :desc=>
137
+ "These functions define a regularization matrix\n" +
138
+ "L = \\diag(l_0,l_1,...,l_{p-1}).\n" +
139
+ "The diagonal matrix element l_i is provided by the\n" +
140
+ "i-th element of the input vector L.\n" +
141
+ "The block (X, y) is converted to standard form and\n" +
142
+ "the parameters (\\tilde{X}, \\tilde{y}) are stored in Xs\n" +
143
+ "and ys on output. Xs and ys have the same dimensions as\n" +
144
+ "X and y. Optional data weights may be supplied in the\n" +
145
+ "vector w. In order to apply this transformation,\n" +
146
+ "L^{-1} must exist and so none of the l_i\n" +
147
+ "may be zero. After the standard form system has been solved,\n" +
148
+ "use gsl_multilarge_linear_genform1 to recover the original solution vector.\n" +
149
+ "It is allowed to have X = Xs and y = ys for an\n" +
150
+ "in-place transform."},
151
+ {:func_name=>"gsl_multilarge_linear_stdform2",
152
+ :func_type=>"int",
153
+ :args=>
154
+ [["const gsl_matrix *", "LQR"],
155
+ ["const gsl_vector *", "Ltau"],
156
+ ["const gsl_matrix *", "X"],
157
+ ["const gsl_vector *", "y"],
158
+ ["gsl_matrix *", "Xs"],
159
+ ["gsl_vector *", "ys"],
160
+ ["gsl_multilarge_linear_workspace *", "work"]],
161
+ :desc=>
162
+ "These functions convert a block of rows (X, y, w) to standard\n" +
163
+ "form (\\tilde{X}, \\tilde{y}) which are stored in Xs and ys\n" +
164
+ "respectively. X, y, and w must all have the same number of rows.\n" +
165
+ "The m-by-p regularization matrix L is specified by the inputs\n" +
166
+ "LQR and Ltau, which are outputs from gsl_multilarge_linear_L_decomp.\n" +
167
+ "Xs and ys have the same dimensions as X and y. After the\n" +
168
+ "standard form system has been solved, use gsl_multilarge_linear_genform2 to\n" +
169
+ "recover the original solution vector. Optional data weights may be supplied in the\n" +
170
+ "vector w, where W = \\diag(w)."},
171
+ {:func_name=>"gsl_multilarge_linear_wstdform1",
172
+ :func_type=>"int",
173
+ :args=>
174
+ [["const gsl_vector *", "L"],
175
+ ["const gsl_matrix *", "X"],
176
+ ["const gsl_vector *", "w"],
177
+ ["const gsl_vector *", "y"],
178
+ ["gsl_matrix *", "Xs"],
179
+ ["gsl_vector *", "ys"],
180
+ ["gsl_multilarge_linear_workspace *", "work"]],
181
+ :desc=>
182
+ "These functions define a regularization matrix\n" +
183
+ "L = \\diag(l_0,l_1,...,l_{p-1}).\n" +
184
+ "The diagonal matrix element l_i is provided by the\n" +
185
+ "i-th element of the input vector L.\n" +
186
+ "The block (X, y) is converted to standard form and\n" +
187
+ "the parameters (\\tilde{X}, \\tilde{y}) are stored in Xs\n" +
188
+ "and ys on output. Xs and ys have the same dimensions as\n" +
189
+ "X and y. Optional data weights may be supplied in the\n" +
190
+ "vector w. In order to apply this transformation,\n" +
191
+ "L^{-1} must exist and so none of the l_i\n" +
192
+ "may be zero. After the standard form system has been solved,\n" +
193
+ "use gsl_multilarge_linear_genform1 to recover the original solution vector.\n" +
194
+ "It is allowed to have X = Xs and y = ys for an\n" +
195
+ "in-place transform."},
196
+ {:func_name=>"gsl_multilarge_linear_wstdform2",
197
+ :func_type=>"int",
198
+ :args=>
199
+ [["const gsl_matrix *", "LQR"],
200
+ ["const gsl_vector *", "Ltau"],
201
+ ["const gsl_matrix *", "X"],
202
+ ["const gsl_vector *", "w"],
203
+ ["const gsl_vector *", "y"],
204
+ ["gsl_matrix *", "Xs"],
205
+ ["gsl_vector *", "ys"],
206
+ ["gsl_multilarge_linear_workspace *", "work"]],
207
+ :desc=>
208
+ "These functions convert a block of rows (X, y, w) to standard\n" +
209
+ "form (\\tilde{X}, \\tilde{y}) which are stored in Xs and ys\n" +
210
+ "respectively. X, y, and w must all have the same number of rows.\n" +
211
+ "The m-by-p regularization matrix L is specified by the inputs\n" +
212
+ "LQR and Ltau, which are outputs from gsl_multilarge_linear_L_decomp.\n" +
213
+ "Xs and ys have the same dimensions as X and y. After the\n" +
214
+ "standard form system has been solved, use gsl_multilarge_linear_genform2 to\n" +
215
+ "recover the original solution vector. Optional data weights may be supplied in the\n" +
216
+ "vector w, where W = \\diag(w)."}]
@@ -0,0 +1,215 @@
1
+ [{:func_name=>"gsl_multilarge_linear_L_decomp",
2
+ :func_type=>"int",
3
+ :args=>[["gsl_matrix *", "L"], ["gsl_vector *", "tau"]],
4
+ :desc=>
5
+ "This function calculates the QR decomposition of the m-by-p regularization matrix\n" +
6
+ "L. L must have m \\ge p. On output,\n" +
7
+ "the Householder scalars are stored in the vector tau of size p.\n" +
8
+ "These outputs will be used by gsl_multilarge_linear_wstdform2 to complete the\n" +
9
+ "transformation to standard form."},
10
+ {:func_name=>"gsl_multilarge_linear_accumulate",
11
+ :func_type=>"int",
12
+ :args=>
13
+ [["gsl_matrix *", "X"],
14
+ ["gsl_vector *", "y"],
15
+ ["gsl_multilarge_linear_workspace *", "w"]],
16
+ :desc=>
17
+ "This function accumulates the standard form block (X,y) into the\n" +
18
+ "current least squares system. X and y have the same number\n" +
19
+ "of rows, which can be arbitrary. X must have p columns.\n" +
20
+ "For the TSQR method, X and y are destroyed on output.\n" +
21
+ "For the normal equations method, they are both unchanged."},
22
+ {:func_name=>"gsl_multilarge_linear_alloc",
23
+ :func_type=>"gsl_multilarge_linear_workspace *",
24
+ :args=>[["const gsl_multilarge_linear_type *", "T"], ["const size_t", "p"]],
25
+ :desc=>
26
+ "This function allocates a workspace for solving large linear least squares\n" +
27
+ "systems. The least squares matrix X has p columns,\n" +
28
+ "but may have any number of rows. The parameter T specifies\n" +
29
+ "the method to be used for solving the large least squares system\n" +
30
+ "and may be selected from the following choices\n" +
31
+ "\n"},
32
+ {:func_name=>"gsl_multilarge_linear_free",
33
+ :func_type=>"void",
34
+ :args=>[["gsl_multilarge_linear_workspace *", "w"]],
35
+ :desc=>
36
+ "This function frees the memory associated with the\n" + "workspace w."},
37
+ {:func_name=>"gsl_multilarge_linear_genform1",
38
+ :func_type=>"int",
39
+ :args=>
40
+ [["const gsl_vector *", "L"],
41
+ ["const gsl_vector *", "cs"],
42
+ ["gsl_vector *", "c"],
43
+ ["gsl_multilarge_linear_workspace *", "work"]],
44
+ :desc=>
45
+ "After a regularized system has been solved with\n" +
46
+ "L = diag(\\l_0,\\l_1,...,\\l_{p-1}),\n" +
47
+ "this function backtransforms the standard form solution vector cs\n" +
48
+ "to recover the solution vector of the original problem c. The\n" +
49
+ "diagonal matrix elements l_i are provided in\n" +
50
+ "the vector L. It is allowed to have c = cs for an\n" +
51
+ "in-place transform."},
52
+ {:func_name=>"gsl_multilarge_linear_genform2",
53
+ :func_type=>"int",
54
+ :args=>
55
+ [["const gsl_matrix *", "LQR"],
56
+ ["const gsl_vector *", "Ltau"],
57
+ ["const gsl_vector *", "cs"],
58
+ ["gsl_vector *", "c"],
59
+ ["gsl_multilarge_linear_workspace *", "work"]],
60
+ :desc=>
61
+ "After a regularized system has been solved with a regularization matrix L,\n" +
62
+ "specified by (LQR,Ltau), this function backtransforms the standard form solution cs\n" +
63
+ "to recover the solution vector of the original problem, which is stored in c,\n" +
64
+ "of length p."},
65
+ {:func_name=>"gsl_multilarge_linear_lcurve",
66
+ :func_type=>"int",
67
+ :args=>
68
+ [["gsl_vector *", "reg_param"],
69
+ ["gsl_vector *", "rho"],
70
+ ["gsl_vector *", "eta"],
71
+ ["gsl_multilarge_linear_workspace *", "work"]],
72
+ :desc=>
73
+ "This function computes the L-curve for a large least squares system\n" +
74
+ "after it has been fully accumulated into the workspace work.\n" +
75
+ "The output vectors reg_param, rho, and eta must all\n" +
76
+ "be the same size, and will contain the regularization parameters\n" +
77
+ "\\lambda_i, residual norms ||y - X c_i||, and solution\n" +
78
+ "norms || L c_i || which compose the L-curve, where c_i\n" +
79
+ "is the regularized solution vector corresponding to \\lambda_i.\n" +
80
+ "The user may determine the number of points on the L-curve by\n" +
81
+ "adjusting the size of these input arrays. For the TSQR method,\n" +
82
+ "the regularization parameters \\lambda_i are estimated from the\n" +
83
+ "singular values of the triangular R factor. For the normal\n" +
84
+ "equations method, they are estimated from the eigenvalues of the\n" +
85
+ "X^T X matrix."},
86
+ {:func_name=>"gsl_multilarge_linear_name",
87
+ :func_type=>"const char *",
88
+ :args=>[["gsl_multilarge_linear_workspace *", "w"]],
89
+ :desc=>
90
+ "This function returns a string pointer to the name\n" +
91
+ "of the multilarge solver."},
92
+ {:func_name=>"gsl_multilarge_linear_rcond",
93
+ :func_type=>"int",
94
+ :args=>
95
+ [["double *", "rcond"], ["gsl_multilarge_linear_workspace *", "work"]],
96
+ :desc=>
97
+ "This function computes the reciprocal condition number, stored in\n" +
98
+ "rcond, of the least squares matrix after it has been accumulated\n" +
99
+ "into the workspace work. For the TSQR algorithm, this is\n" +
100
+ "accomplished by calculating the SVD of the R factor, which\n" +
101
+ "has the same singular values as the matrix X. For the normal\n" +
102
+ "equations method, this is done by computing the eigenvalues of\n" +
103
+ "X^T X, which could be inaccurate for ill-conditioned matrices\n" +
104
+ "X."},
105
+ {:func_name=>"gsl_multilarge_linear_reset",
106
+ :func_type=>"int",
107
+ :args=>[["gsl_multilarge_linear_workspace *", "w"]],
108
+ :desc=>
109
+ "This function resets the workspace w so\n" +
110
+ "it can begin to accumulate a new least squares\n" +
111
+ "system."},
112
+ {:func_name=>"gsl_multilarge_linear_solve",
113
+ :func_type=>"int",
114
+ :args=>
115
+ [["const double", "lambda"],
116
+ ["gsl_vector *", "c"],
117
+ ["double *", "rnorm"],
118
+ ["double *", "snorm"],
119
+ ["gsl_multilarge_linear_workspace *", "w"]],
120
+ :desc=>
121
+ "After all blocks (X_i,y_i) have been accumulated into\n" +
122
+ "the large least squares system, this function will compute\n" +
123
+ "the solution vector which is stored in c on output.\n" +
124
+ "The regularization parameter \\lambda is provided in\n" +
125
+ "lambda. On output, rnorm contains the residual norm\n" +
126
+ "||y - X c||_W and snorm contains the solution\n" +
127
+ "norm ||L c||."},
128
+ {:func_name=>"gsl_multilarge_linear_stdform1",
129
+ :func_type=>"int",
130
+ :args=>
131
+ [["const gsl_vector *", "L"],
132
+ ["const gsl_matrix *", "X"],
133
+ ["const gsl_vector *", "y"],
134
+ ["gsl_matrix *", "Xs"],
135
+ ["gsl_vector *", "ys"],
136
+ ["gsl_multilarge_linear_workspace *", "work"]],
137
+ :desc=>
138
+ "These functions define a regularization matrix\n" +
139
+ "L = diag(l_0,l_1,...,l_{p-1}).\n" +
140
+ "The diagonal matrix element l_i is provided by the\n" +
141
+ "ith element of the input vector L.\n" +
142
+ "The block (X,y) is converted to standard form and\n" +
143
+ "the parameters (\\tilde{X},\\tilde{y}) are stored in Xs\n" +
144
+ "and ys on output. Xs and ys have the same dimensions as\n" +
145
+ "X and y. Optional data weights may be supplied in the\n" +
146
+ "vector w. In order to apply this transformation,\n" +
147
+ "L^{-1} must exist and so none of the l_i\n" +
148
+ "may be zero. After the standard form system has been solved,\n" +
149
+ "use gsl_multilarge_linear_genform1 to recover the original solution vector.\n" +
150
+ "It is allowed to have X = Xs and y = ys for an in-place transform."},
151
+ {:func_name=>"gsl_multilarge_linear_stdform2",
152
+ :func_type=>"int",
153
+ :args=>
154
+ [["const gsl_matrix *", "LQR"],
155
+ ["const gsl_vector *", "Ltau"],
156
+ ["const gsl_matrix *", "X"],
157
+ ["const gsl_vector *", "y"],
158
+ ["gsl_matrix *", "Xs"],
159
+ ["gsl_vector *", "ys"],
160
+ ["gsl_multilarge_linear_workspace *", "work"]],
161
+ :desc=>
162
+ "These functions convert a block of rows (X,y,w) to standard\n" +
163
+ "form (\\tilde{X},\\tilde{y}) which are stored in Xs and ys\n" +
164
+ "respectively. X, y, and w must all have the same number of rows.\n" +
165
+ "The m-by-p regularization matrix L is specified by the inputs\n" +
166
+ "LQR and Ltau, which are outputs from gsl_multilarge_linear_L_decomp.\n" +
167
+ "Xs and ys have the same dimensions as X and y. After the\n" +
168
+ "standard form system has been solved, use gsl_multilarge_linear_genform2 to\n" +
169
+ "recover the original solution vector. Optional data weights may be supplied in the\n" +
170
+ "vector w, where W = diag(w)."},
171
+ {:func_name=>"gsl_multilarge_linear_wstdform1",
172
+ :func_type=>"int",
173
+ :args=>
174
+ [["const gsl_vector *", "L"],
175
+ ["const gsl_matrix *", "X"],
176
+ ["const gsl_vector *", "w"],
177
+ ["const gsl_vector *", "y"],
178
+ ["gsl_matrix *", "Xs"],
179
+ ["gsl_vector *", "ys"],
180
+ ["gsl_multilarge_linear_workspace *", "work"]],
181
+ :desc=>
182
+ "These functions define a regularization matrix\n" +
183
+ "L = diag(l_0,l_1,...,l_{p-1}).\n" +
184
+ "The diagonal matrix element l_i is provided by the\n" +
185
+ "ith element of the input vector L.\n" +
186
+ "The block (X,y) is converted to standard form and\n" +
187
+ "the parameters (\\tilde{X},\\tilde{y}) are stored in Xs\n" +
188
+ "and ys on output. Xs and ys have the same dimensions as\n" +
189
+ "X and y. Optional data weights may be supplied in the\n" +
190
+ "vector w. In order to apply this transformation,\n" +
191
+ "L^{-1} must exist and so none of the l_i\n" +
192
+ "may be zero. After the standard form system has been solved,\n" +
193
+ "use gsl_multilarge_linear_genform1 to recover the original solution vector.\n" +
194
+ "It is allowed to have X = Xs and y = ys for an in-place transform."},
195
+ {:func_name=>"gsl_multilarge_linear_wstdform2",
196
+ :func_type=>"int",
197
+ :args=>
198
+ [["const gsl_matrix *", "LQR"],
199
+ ["const gsl_vector *", "Ltau"],
200
+ ["const gsl_matrix *", "X"],
201
+ ["const gsl_vector *", "w"],
202
+ ["const gsl_vector *", "y"],
203
+ ["gsl_matrix *", "Xs"],
204
+ ["gsl_vector *", "ys"],
205
+ ["gsl_multilarge_linear_workspace *", "work"]],
206
+ :desc=>
207
+ "These functions convert a block of rows (X,y,w) to standard\n" +
208
+ "form (\\tilde{X},\\tilde{y}) which are stored in Xs and ys\n" +
209
+ "respectively. X, y, and w must all have the same number of rows.\n" +
210
+ "The m-by-p regularization matrix L is specified by the inputs\n" +
211
+ "LQR and Ltau, which are outputs from gsl_multilarge_linear_L_decomp.\n" +
212
+ "Xs and ys have the same dimensions as X and y. After the\n" +
213
+ "standard form system has been solved, use gsl_multilarge_linear_genform2 to\n" +
214
+ "recover the original solution vector. Optional data weights may be supplied in the\n" +
215
+ "vector w, where W = diag(w)."}]
@@ -0,0 +1,117 @@
1
+ #ifndef NUMO_GSL_H
2
+ #define NUMO_GSL_H
3
+
4
+ #define GET_PTR(lp,i) NDL_PTR(lp,i)
5
+ // (((lp)->args[i]).ptr + ((lp)->args[i].iter[0]).pos)
6
+
7
+ #if SIZEOF_INT == 4
8
+ #define cI numo_cInt32
9
+ #define cUI numo_cUInt32
10
+ #elif SIZEOF_INT==8
11
+ #define cI numo_cInt64
12
+ #define cUI numo_cUInt64
13
+ #endif
14
+
15
+ #if SIZEOF_SIZE_T == 4
16
+ #define cSZ numo_cUInt32
17
+ #define cSSZ numo_cInt32
18
+ #elif SIZEOF_SIZE_T == 8
19
+ #define cSZ numo_cUInt64
20
+ #define cSSZ numo_cInt64
21
+ #endif
22
+
23
+ #define cDF numo_cDFloat
24
+ #define cDC numo_cDComplex
25
+ #define cInt cI
26
+ #define cUInt cUI
27
+
28
+ #define ALLOCA_GSL_VECTOR_FROM_NARRAY(nary,gvec,mode) \
29
+ { \
30
+ narray_t *na; \
31
+ GetNArray(nary,na); \
32
+ gvec = ALLOCA_N(gsl_vector,1); \
33
+ gvec->data = (double*)na_get_pointer_for_##mode(nary); \
34
+ gvec->size = na->shape[0]; \
35
+ gvec->stride = 1; \
36
+ gvec->block = 0; \
37
+ gvec->owner = 0; \
38
+ }
39
+
40
+ #define ALLOCA_GSL_MATRIX_FROM_NARRAY(nary,gmat,mode) \
41
+ { \
42
+ narray_t *na; \
43
+ GetNArray(nary,na); \
44
+ gmat = ALLOCA_N(gsl_matrix,1); \
45
+ gmat->data = (double*)na_get_pointer_for_##mode(nary); \
46
+ gmat->size1 = na->shape[0]; \
47
+ gmat->size2 = na->shape[1]; \
48
+ gmat->tda = na->shape[1]; \
49
+ gmat->block = 0; \
50
+ gmat->owner = 0; \
51
+ }
52
+
53
+ #define ALLOCA_GSL_VECTOR_FROM_NARRAY_R(nary,gvec) \
54
+ ALLOCA_GSL_VECTOR_FROM_NARRAY(nary,gvec,read)
55
+ #define ALLOCA_GSL_MATRIX_FROM_NARRAY_R(nary,gmat) \
56
+ ALLOCA_GSL_MATRIX_FROM_NARRAY(nary,gmat,read)
57
+ #define ALLOCA_GSL_VECTOR_FROM_NARRAY_W(nary,gvec) \
58
+ ALLOCA_GSL_VECTOR_FROM_NARRAY(nary,gvec,write)
59
+ #define ALLOCA_GSL_MATRIX_FROM_NARRAY_W(nary,gmat) \
60
+ ALLOCA_GSL_MATRIX_FROM_NARRAY(nary,gmat,write)
61
+ #define ALLOCA_GSL_VECTOR_FROM_NARRAY_RW(nary,gvec) \
62
+ ALLOCA_GSL_VECTOR_FROM_NARRAY(nary,gvec,read_write)
63
+ #define ALLOCA_GSL_MATRIX_FROM_NARRAY_RW(nary,gmat) \
64
+ ALLOCA_GSL_MATRIX_FROM_NARRAY(nary,gmat,read_write)
65
+
66
+ #define ALLOCA_GSL_MATRIX_FROM_LOOPT(lp,i,gmat) \
67
+ { \
68
+ assert((lp)->args[i].ndim == 2); \
69
+ gmat = ALLOCA_N(gsl_matrix,1); \
70
+ gmat->data = (double*)NDL_PTR(lp,i); \
71
+ gmat->size1 = (lp)->args[i].shape[0]; \
72
+ gmat->size2 = (lp)->args[i].shape[1]; \
73
+ gmat->tda = gmat->size2; \
74
+ gmat->block = 0; \
75
+ gmat->owner = 0; \
76
+ }
77
+
78
+ #define ALLOCA_GSL_VECTOR_FROM_LOOPT(lp,i,gvec) \
79
+ { \
80
+ assert((lp)->args[i].ndim == 1); \
81
+ gvec = ALLOCA_N(gsl_vector,1); \
82
+ gvec->data = (double*)NDL_PTR(lp,i); \
83
+ gvec->size = (lp)->args[i].shape[0]; \
84
+ gvec->stride = NDL_SETP(lp,i)/sizeof(double); \
85
+ gvec->block = 0; \
86
+ gvec->owner = 0; \
87
+ }
88
+
89
+ #define SET_GSL_MATRIX_FROM_LOOPT(lp,i,gmat) \
90
+ { \
91
+ assert((lp)->args[i].ndim == 2); \
92
+ gmat.data = (double*)NDL_PTR(lp,i); \
93
+ gmat.size1 = (lp)->args[i].shape[0]; \
94
+ gmat.size2 = (lp)->args[i].shape[1]; \
95
+ gmat.tda = gmat.size2; \
96
+ gmat.block = 0; \
97
+ gmat.owner = 0; \
98
+ }
99
+
100
+ #define SET_GSL_VECTOR_FROM_LOOPT(lp,i,gvec) \
101
+ { \
102
+ assert((lp)->args[i].ndim == 1); \
103
+ gvec.data = (double*)NDL_PTR(lp,i); \
104
+ gvec.size = (lp)->args[i].shape[0]; \
105
+ gvec.stride = NDL_STEP(lp,i)/sizeof(double); \
106
+ gvec.block = 0; \
107
+ gvec.owner = 0; \
108
+ }
109
+
110
+ #define MAT_SIZE1(x) ((x)->shape[(x)->ndim-2])
111
+ #define MAT_SIZE2(x) ((x)->shape[(x)->ndim-1])
112
+ #define VEC_SIZE(x) ((x)->shape[(x)->ndim-1])
113
+ #define CHECK_GE_1D(x) {if ((x)->ndim < 1) {rb_raise(nary_eDimensionError,#x" dimension must be >= 1");}}
114
+ #define CHECK_GE_2D(x) {if ((x)->ndim < 2) {rb_raise(nary_eDimensionError,#x" dimension must be >= 2");}}
115
+ #define CHECK_SIZE_EQ(x,y,msg) {if ((x)!=(y)) {rb_raise(nary_eShapeError,msg);}}
116
+
117
+ #endif /* ifndef NUMO_GSL_H */
@@ -0,0 +1,17 @@
1
+ COGEN=ruby erbpp_pdf.rb
2
+ GENSRC=gsl_pdf.c
3
+ GENDEPS=erbpp_pdf.rb ../gen/*.rb ../gen/tmpl/*.c 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,27 @@
1
+ require_relative "../gen/erbpp_gsl"
2
+ require_relative "parse_pdf"
3
+
4
+ DefLib.new do
5
+ set line_number: true
6
+ set erb_dir: %w[tmpl ../gen/tmpl]
7
+ set erb_suffix: ".c"
8
+ set ns_var: "mG"
9
+
10
+ name = "Pdf"
11
+ base = name.downcase
12
+ set file_name: "gsl_#{name}.c"
13
+ set include_files: ["gsl/gsl_randist.h"]
14
+ set lib_name: base
15
+
16
+ DefPdf.new(self) do
17
+ set name: base
18
+ set module_name: name
19
+ set module_var: "m"+name
20
+ set full_module_name: "Numo::GSL::"+name
21
+
22
+ ErbppGsl.read_func.each do |h|
23
+ check_func(h)
24
+ end
25
+ end
26
+
27
+ end.run
@@ -0,0 +1,9 @@
1
+ require_relative '../extconf_gsl.rb'
2
+
3
+ # source file to compile
4
+ srcs = %w(
5
+ gsl_pdf
6
+ )
7
+ $objs = srcs.collect{|i| i+".o"}
8
+
9
+ create_makefile('numo/gsl/pdf')