numo-gsl 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (266) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/README.md +84 -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_def.rb +419 -0
  10. data/ext/numo/gsl/const/depend +17 -0
  11. data/ext/numo/gsl/const/erbpp_const.rb +30 -0
  12. data/ext/numo/gsl/const/extconf.rb +9 -0
  13. data/ext/numo/gsl/err/depend +1 -0
  14. data/ext/numo/gsl/err/err.c +22 -0
  15. data/ext/numo/gsl/err/extconf.rb +9 -0
  16. data/ext/numo/gsl/extconf_gsl.rb +44 -0
  17. data/ext/numo/gsl/fit/depend +17 -0
  18. data/ext/numo/gsl/fit/erbpp_fit.rb +74 -0
  19. data/ext/numo/gsl/fit/extconf.rb +9 -0
  20. data/ext/numo/gsl/fit/func_def.rb +129 -0
  21. data/ext/numo/gsl/fit/tmpl/check_1d.c +9 -0
  22. data/ext/numo/gsl/fit/tmpl/fit_linear.c +53 -0
  23. data/ext/numo/gsl/fit/tmpl/fit_linear_est.c +56 -0
  24. data/ext/numo/gsl/fit/tmpl/fit_mul.c +50 -0
  25. data/ext/numo/gsl/fit/tmpl/fit_mul_est.c +47 -0
  26. data/ext/numo/gsl/fit/tmpl/fit_wlinear.c +59 -0
  27. data/ext/numo/gsl/fit/tmpl/fit_wmul.c +56 -0
  28. data/ext/numo/gsl/gen/erbpp2.rb +306 -0
  29. data/ext/numo/gsl/gen/erbpp_gsl.rb +166 -0
  30. data/ext/numo/gsl/gen/func_parser.rb +520 -0
  31. data/ext/numo/gsl/gen/tmpl/c_DFloat_f_DFloat.c +40 -0
  32. data/ext/numo/gsl/gen/tmpl/c_DFloat_f_SZ.c +41 -0
  33. data/ext/numo/gsl/gen/tmpl/c_DFloat_f_SZ_x2.c +44 -0
  34. data/ext/numo/gsl/gen/tmpl/c_DFloat_x2_f_DFloat_x2.c +45 -0
  35. data/ext/numo/gsl/gen/tmpl/c_double_f_double.c +16 -0
  36. data/ext/numo/gsl/gen/tmpl/c_double_f_sizet.c +16 -0
  37. data/ext/numo/gsl/gen/tmpl/c_double_f_sizet_x2.c +17 -0
  38. data/ext/numo/gsl/gen/tmpl/c_double_f_void.c +15 -0
  39. data/ext/numo/gsl/gen/tmpl/c_double_x2_f_void.c +17 -0
  40. data/ext/numo/gsl/gen/tmpl/c_new_DFloat.c +29 -0
  41. data/ext/numo/gsl/gen/tmpl/c_new_double.c +22 -0
  42. data/ext/numo/gsl/gen/tmpl/c_new_f_other.c +25 -0
  43. data/ext/numo/gsl/gen/tmpl/c_new_sizet.c +22 -0
  44. data/ext/numo/gsl/gen/tmpl/c_new_sizet_double.c +23 -0
  45. data/ext/numo/gsl/gen/tmpl/c_new_sizet_x2.c +23 -0
  46. data/ext/numo/gsl/gen/tmpl/c_new_void.c +21 -0
  47. data/ext/numo/gsl/gen/tmpl/c_other_f_void.c +19 -0
  48. data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat.c +46 -0
  49. data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat_x2.c +41 -0
  50. data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat_x3.c +44 -0
  51. data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat_x4.c +47 -0
  52. data/ext/numo/gsl/gen/tmpl/c_self_f_SZ_x2_DFloat.c +45 -0
  53. data/ext/numo/gsl/gen/tmpl/c_self_f_double.c +17 -0
  54. data/ext/numo/gsl/gen/tmpl/c_self_f_other.c +17 -0
  55. data/ext/numo/gsl/gen/tmpl/c_self_f_sizet.c +21 -0
  56. data/ext/numo/gsl/gen/tmpl/c_self_f_void.c +14 -0
  57. data/ext/numo/gsl/gen/tmpl/c_sizet_f_void.c +15 -0
  58. data/ext/numo/gsl/gen/tmpl/c_sizet_x2_f_void.c +17 -0
  59. data/ext/numo/gsl/gen/tmpl/c_str_f_void.c +15 -0
  60. data/ext/numo/gsl/gen/tmpl/c_super_new_void.c +18 -0
  61. data/ext/numo/gsl/gen/tmpl/c_uint_f_void.c +15 -0
  62. data/ext/numo/gsl/gen/tmpl/c_ulong_f_void.c +15 -0
  63. data/ext/numo/gsl/gen/tmpl/c_void_f_double.c +17 -0
  64. data/ext/numo/gsl/gen/tmpl/c_void_f_double_x2.c +18 -0
  65. data/ext/numo/gsl/gen/tmpl/c_void_f_double_x4.c +20 -0
  66. data/ext/numo/gsl/gen/tmpl/c_void_f_ulong.c +17 -0
  67. data/ext/numo/gsl/gen/tmpl/c_void_f_void.c +14 -0
  68. data/ext/numo/gsl/gen/tmpl/cast_1d_contiguous.c +15 -0
  69. data/ext/numo/gsl/gen/tmpl/cast_2d_contiguous.c +15 -0
  70. data/ext/numo/gsl/gen/tmpl/class.c +26 -0
  71. data/ext/numo/gsl/gen/tmpl/create_new_narray.c +26 -0
  72. data/ext/numo/gsl/gen/tmpl/init_class.c +10 -0
  73. data/ext/numo/gsl/gen/tmpl/init_module.c +12 -0
  74. data/ext/numo/gsl/gen/tmpl/lib.c +41 -0
  75. data/ext/numo/gsl/gen/tmpl/m_DFloat_Int_f_DFloat.c +38 -0
  76. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat.c +35 -0
  77. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_Int.c +39 -0
  78. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_UInt.c +39 -0
  79. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_double.c +42 -0
  80. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_double_x2.c +47 -0
  81. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_int.c +42 -0
  82. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_x2.c +38 -0
  83. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_x3.c +41 -0
  84. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_Int.c +36 -0
  85. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt.c +36 -0
  86. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32.c +36 -0
  87. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_double.c +43 -0
  88. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_double_uint.c +49 -0
  89. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_double_x2.c +48 -0
  90. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_uint_x3.c +51 -0
  91. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_double.c +43 -0
  92. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_double_uint.c +50 -0
  93. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_double_x2.c +48 -0
  94. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_uint_x3.c +51 -0
  95. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_int_DFloat.c +41 -0
  96. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_int_DFloat_x2.c +44 -0
  97. data/ext/numo/gsl/gen/tmpl/m_DFloat_f_int_x2_DFloat_x2.c +46 -0
  98. data/ext/numo/gsl/gen/tmpl/m_Int_f_DFloat.c +36 -0
  99. data/ext/numo/gsl/gen/tmpl/m_Int_f_DFloat_x3.c +42 -0
  100. data/ext/numo/gsl/gen/tmpl/m_Int_f_int_DFloat.c +42 -0
  101. data/ext/numo/gsl/gen/tmpl/m_Int_f_int_DFloat_x2.c +45 -0
  102. data/ext/numo/gsl/gen/tmpl/mod_func_noloop.c +54 -0
  103. data/ext/numo/gsl/gen/tmpl/mod_func_scalar.c +27 -0
  104. data/ext/numo/gsl/gen/tmpl/module.c +9 -0
  105. data/ext/numo/gsl/histogram/depend +17 -0
  106. data/ext/numo/gsl/histogram/erbpp_histogram.rb +109 -0
  107. data/ext/numo/gsl/histogram/extconf.rb +9 -0
  108. data/ext/numo/gsl/histogram/func_def.rb +763 -0
  109. data/ext/numo/gsl/histogram/tmpl/c_DFloat_f_2d_get.c +54 -0
  110. data/ext/numo/gsl/histogram/tmpl/c_DFloat_f_field.c +35 -0
  111. data/ext/numo/gsl/histogram/tmpl/c_DFloat_f_get.c +47 -0
  112. data/ext/numo/gsl/histogram/tmpl/c_DFloat_x2_f_get_range.c +56 -0
  113. data/ext/numo/gsl/histogram/tmpl/c_bool_f_other.c +19 -0
  114. data/ext/numo/gsl/histogram/tmpl/c_bool_f_pdf_init.c +24 -0
  115. data/ext/numo/gsl/histogram/tmpl/c_self_f_2d_set_ranges.c +26 -0
  116. data/ext/numo/gsl/histogram/tmpl/c_self_f_set_ranges.c +21 -0
  117. data/ext/numo/gsl/histogram/tmpl/c_sizet_f_field.c +15 -0
  118. data/ext/numo/gsl/interp/depend +17 -0
  119. data/ext/numo/gsl/interp/erbpp_interp.rb +59 -0
  120. data/ext/numo/gsl/interp/extconf.rb +9 -0
  121. data/ext/numo/gsl/interp/func_def.rb +816 -0
  122. data/ext/numo/gsl/interp/parse_interp.rb +67 -0
  123. data/ext/numo/gsl/interp/tmpl/interp2d_new.c +36 -0
  124. data/ext/numo/gsl/interp/tmpl/interp2d_type_new.c +17 -0
  125. data/ext/numo/gsl/interp/tmpl/interp_bsearch.c +57 -0
  126. data/ext/numo/gsl/interp/tmpl/interp_new.c +29 -0
  127. data/ext/numo/gsl/interp/tmpl/interp_type_new.c +16 -0
  128. data/ext/numo/gsl/interp/tmpl/spline2d_eval.c +61 -0
  129. data/ext/numo/gsl/interp/tmpl/spline_eval.c +55 -0
  130. data/ext/numo/gsl/interp/tmpl/spline_integ.c +56 -0
  131. data/ext/numo/gsl/interp/type_def.rb +9 -0
  132. data/ext/numo/gsl/multifit/depend +17 -0
  133. data/ext/numo/gsl/multifit/erbpp_multifit.rb +99 -0
  134. data/ext/numo/gsl/multifit/extconf.rb +9 -0
  135. data/ext/numo/gsl/multifit/func_2.1.rb +1035 -0
  136. data/ext/numo/gsl/multifit/func_2.2.1.rb +736 -0
  137. data/ext/numo/gsl/multifit/func_2.2.rb +736 -0
  138. data/ext/numo/gsl/multifit/func_2.3.rb +872 -0
  139. data/ext/numo/gsl/multifit/func_def.rb +1012 -0
  140. data/ext/numo/gsl/multifit/tmpl/multifit_linear.c +66 -0
  141. data/ext/numo/gsl/multifit/tmpl/multifit_linear_est.c +48 -0
  142. data/ext/numo/gsl/multifit/tmpl/multifit_linear_residuals.c +47 -0
  143. data/ext/numo/gsl/multifit/tmpl/multifit_wlinear.c +70 -0
  144. data/ext/numo/gsl/multifit/type_def.rb +1 -0
  145. data/ext/numo/gsl/numo_gsl.h +117 -0
  146. data/ext/numo/gsl/pdf/depend +17 -0
  147. data/ext/numo/gsl/pdf/erbpp_pdf.rb +26 -0
  148. data/ext/numo/gsl/pdf/extconf.rb +9 -0
  149. data/ext/numo/gsl/pdf/func_2.2.1.rb +306 -0
  150. data/ext/numo/gsl/pdf/func_2.2.rb +306 -0
  151. data/ext/numo/gsl/pdf/func_2.3.rb +306 -0
  152. data/ext/numo/gsl/pdf/func_def.rb +282 -0
  153. data/ext/numo/gsl/pdf/parse_pdf.rb +42 -0
  154. data/ext/numo/gsl/pdf/tmpl/dirichlet.c +39 -0
  155. data/ext/numo/gsl/pdf/tmpl/multinomial.c +39 -0
  156. data/ext/numo/gsl/poly/depend +17 -0
  157. data/ext/numo/gsl/poly/erbpp_poly.rb +70 -0
  158. data/ext/numo/gsl/poly/extconf.rb +9 -0
  159. data/ext/numo/gsl/poly/func_def.rb +234 -0
  160. data/ext/numo/gsl/poly/tmpl/poly_complex_solve.c +59 -0
  161. data/ext/numo/gsl/poly/tmpl/poly_eval.c +70 -0
  162. data/ext/numo/gsl/poly/tmpl/poly_eval_derivs.c +40 -0
  163. data/ext/numo/gsl/ran/depend +17 -0
  164. data/ext/numo/gsl/ran/erbpp_ran.rb +42 -0
  165. data/ext/numo/gsl/ran/extconf.rb +9 -0
  166. data/ext/numo/gsl/ran/func_2.2.1.rb +1658 -0
  167. data/ext/numo/gsl/ran/func_2.2.rb +1658 -0
  168. data/ext/numo/gsl/ran/func_2.3.rb +1658 -0
  169. data/ext/numo/gsl/ran/func_def.rb +1594 -0
  170. data/ext/numo/gsl/ran/parse_ran.rb +10 -0
  171. data/ext/numo/gsl/rng/depend +17 -0
  172. data/ext/numo/gsl/rng/erbpp_rng.rb +58 -0
  173. data/ext/numo/gsl/rng/extconf.rb +9 -0
  174. data/ext/numo/gsl/rng/func_def.rb +230 -0
  175. data/ext/numo/gsl/rng/parse_rng.rb +125 -0
  176. data/ext/numo/gsl/rng/tmpl/ran.c +40 -0
  177. data/ext/numo/gsl/rng/tmpl/ran_DFloat_f_DFloat.c +28 -0
  178. data/ext/numo/gsl/rng/tmpl/ran_DFloat_x2.c +45 -0
  179. data/ext/numo/gsl/rng/tmpl/ran_DFloat_x3.c +51 -0
  180. data/ext/numo/gsl/rng/tmpl/ran_multinomial.c +32 -0
  181. data/ext/numo/gsl/rng/tmpl/rng_DFloat.c +29 -0
  182. data/ext/numo/gsl/rng/tmpl/rng_UInt.c +44 -0
  183. data/ext/numo/gsl/rng/tmpl/rng_alloc.c +24 -0
  184. data/ext/numo/gsl/rng/tmpl/rng_type_new.c +14 -0
  185. data/ext/numo/gsl/rng/type_def.rb +63 -0
  186. data/ext/numo/gsl/rstat/depend +17 -0
  187. data/ext/numo/gsl/rstat/erbpp_rstat.rb +64 -0
  188. data/ext/numo/gsl/rstat/extconf.rb +9 -0
  189. data/ext/numo/gsl/rstat/func_2.2.1.rb +116 -0
  190. data/ext/numo/gsl/rstat/func_2.2.rb +116 -0
  191. data/ext/numo/gsl/rstat/func_2.3.rb +123 -0
  192. data/ext/numo/gsl/rstat/func_def.rb +102 -0
  193. data/ext/numo/gsl/sf/depend +17 -0
  194. data/ext/numo/gsl/sf/erbpp_sf.rb +51 -0
  195. data/ext/numo/gsl/sf/extconf.rb +9 -0
  196. data/ext/numo/gsl/sf/func_def.rb +4703 -0
  197. data/ext/numo/gsl/sf/parse_sf.rb +277 -0
  198. data/ext/numo/gsl/sf/tmpl/c_DFloat_f_int_x2_DFloat.c +50 -0
  199. data/ext/numo/gsl/sf/tmpl/c_DFloat_f_int_x2_DFloat_x2.c +52 -0
  200. data/ext/numo/gsl/sf/tmpl/c_DFloat_f_int_x3_DFloat_x2.c +55 -0
  201. data/ext/numo/gsl/sf/tmpl/m_DFloat_f_DFloat_mode.c +47 -0
  202. data/ext/numo/gsl/sf/tmpl/m_DFloat_f_lmax_array.c +41 -0
  203. data/ext/numo/gsl/sf/tmpl/m_DFloat_f_nmin_nmax_array.c +49 -0
  204. data/ext/numo/gsl/spmatrix/const_2.2.1.rb +3 -0
  205. data/ext/numo/gsl/spmatrix/const_2.2.rb +3 -0
  206. data/ext/numo/gsl/spmatrix/const_2.3.rb +3 -0
  207. data/ext/numo/gsl/spmatrix/const_def.rb +2 -0
  208. data/ext/numo/gsl/spmatrix/depend +17 -0
  209. data/ext/numo/gsl/spmatrix/erbpp_spmatrix.rb +100 -0
  210. data/ext/numo/gsl/spmatrix/extconf.rb +9 -0
  211. data/ext/numo/gsl/spmatrix/func_2.2.1.rb +297 -0
  212. data/ext/numo/gsl/spmatrix/func_2.2.rb +297 -0
  213. data/ext/numo/gsl/spmatrix/func_2.3.rb +297 -0
  214. data/ext/numo/gsl/spmatrix/func_def.rb +218 -0
  215. data/ext/numo/gsl/spmatrix/parse_spmatrix.rb +70 -0
  216. data/ext/numo/gsl/spmatrix/tmpl/itersolve_iterate.c +47 -0
  217. data/ext/numo/gsl/spmatrix/tmpl/itersolve_new.c +22 -0
  218. data/ext/numo/gsl/spmatrix/tmpl/itersolve_type_new.c +16 -0
  219. data/ext/numo/gsl/spmatrix/tmpl/spblas_dgemm.c +35 -0
  220. data/ext/numo/gsl/spmatrix/tmpl/spblas_dgemv.c +43 -0
  221. data/ext/numo/gsl/spmatrix/tmpl/spmatrix_add.c +22 -0
  222. data/ext/numo/gsl/spmatrix/tmpl/spmatrix_d2sp.c +28 -0
  223. data/ext/numo/gsl/spmatrix/tmpl/spmatrix_new.c +40 -0
  224. data/ext/numo/gsl/spmatrix/tmpl/spmatrix_sp2d.c +25 -0
  225. data/ext/numo/gsl/spmatrix/type_def.rb +1 -0
  226. data/ext/numo/gsl/stats/depend +17 -0
  227. data/ext/numo/gsl/stats/erbpp_stats.rb +29 -0
  228. data/ext/numo/gsl/stats/extconf.rb +9 -0
  229. data/ext/numo/gsl/stats/func_2.2.1.rb +608 -0
  230. data/ext/numo/gsl/stats/func_2.2.rb +608 -0
  231. data/ext/numo/gsl/stats/func_2.3.rb +608 -0
  232. data/ext/numo/gsl/stats/func_def.rb +608 -0
  233. data/ext/numo/gsl/stats/parse_stats.rb +63 -0
  234. data/ext/numo/gsl/stats/tmpl/stats_1a0p.c +37 -0
  235. data/ext/numo/gsl/stats/tmpl/stats_1a0p_index.c +60 -0
  236. data/ext/numo/gsl/stats/tmpl/stats_1a1p.c +41 -0
  237. data/ext/numo/gsl/stats/tmpl/stats_1a2p.c +42 -0
  238. data/ext/numo/gsl/stats/tmpl/stats_2a0p.c +39 -0
  239. data/ext/numo/gsl/stats/tmpl/stats_2a1p.c +43 -0
  240. data/ext/numo/gsl/stats/tmpl/stats_2a2p.c +44 -0
  241. data/ext/numo/gsl/stats/tmpl/stats_minmax.c +37 -0
  242. data/ext/numo/gsl/stats/tmpl/stats_minmax_index.c +67 -0
  243. data/ext/numo/gsl/stats/tmpl/stats_spearman.c +46 -0
  244. data/ext/numo/gsl/sys/const_def.rb +21 -0
  245. data/ext/numo/gsl/sys/depend +17 -0
  246. data/ext/numo/gsl/sys/enum_def.rb +75 -0
  247. data/ext/numo/gsl/sys/erbpp_sys.rb +60 -0
  248. data/ext/numo/gsl/sys/extconf.rb +9 -0
  249. data/ext/numo/gsl/sys/func_def.rb +249 -0
  250. data/ext/numo/gsl/version.h +1 -0
  251. data/ext/numo/gsl/wavelet/depend +17 -0
  252. data/ext/numo/gsl/wavelet/erbpp_wavelet.rb +48 -0
  253. data/ext/numo/gsl/wavelet/extconf.rb +9 -0
  254. data/ext/numo/gsl/wavelet/func_def.rb +337 -0
  255. data/ext/numo/gsl/wavelet/parse_wavelet.rb +47 -0
  256. data/ext/numo/gsl/wavelet/tmpl/wavelet2d_transform.c +56 -0
  257. data/ext/numo/gsl/wavelet/tmpl/wavelet_array_check.c +56 -0
  258. data/ext/numo/gsl/wavelet/tmpl/wavelet_macro.c +1 -0
  259. data/ext/numo/gsl/wavelet/tmpl/wavelet_new.c +20 -0
  260. data/ext/numo/gsl/wavelet/tmpl/wavelet_transform.c +55 -0
  261. data/ext/numo/gsl/wavelet/tmpl/wavelet_transform2.c +22 -0
  262. data/ext/numo/gsl/wavelet/tmpl/wavelet_type_new.c +15 -0
  263. data/ext/numo/gsl/wavelet/type_def.rb +6 -0
  264. data/lib/numo/gsl.rb +17 -0
  265. data/numo-gsl.gemspec +33 -0
  266. metadata +367 -0
@@ -0,0 +1,608 @@
1
+ [{:func_name=>"gsl_stats_mean",
2
+ :func_type=>"double",
3
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
4
+ :desc=>
5
+ "This function returns the arithmetic mean of data, a dataset of\n" +
6
+ "length n with stride stride. The arithmetic mean, or\n" +
7
+ "sample mean, is denoted by \\Hat\\mu and defined as,\n" +
8
+ "\n" +
9
+ "\\Hat\\mu = (1/N) \\sum x_i\n" +
10
+ "\n" +
11
+ "where x_i are the elements of the dataset data. For\n" +
12
+ "samples drawn from a gaussian distribution the variance of\n" +
13
+ "\\Hat\\mu is \\sigma^2 / N."},
14
+ {:func_name=>"gsl_stats_variance",
15
+ :func_type=>"double",
16
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
17
+ :desc=>
18
+ "This function returns the estimated, or sample, variance of\n" +
19
+ "data, a dataset of length n with stride stride. The\n" +
20
+ "estimated variance is denoted by \\Hat\\sigma^2 and is defined by,\n" +
21
+ "\n" +
22
+ "\\Hat\\sigma^2 = (1/(N-1)) \\sum (x_i - \\Hat\\mu)^2\n" +
23
+ "\n" +
24
+ "where x_i are the elements of the dataset data. Note that\n" +
25
+ "the normalization factor of 1/(N-1) results from the derivation\n" +
26
+ "of \\Hat\\sigma^2 as an unbiased estimator of the population\n" +
27
+ "variance \\sigma^2. For samples drawn from a Gaussian distribution\n" +
28
+ "the variance of \\Hat\\sigma^2 itself is 2 \\sigma^4 / N.\n" +
29
+ "\n" +
30
+ "This function computes the mean via a call to gsl_stats_mean. If\n" +
31
+ "you have already computed the mean then you can pass it directly to\n" +
32
+ "gsl_stats_variance_m."},
33
+ {:func_name=>"gsl_stats_variance_m",
34
+ :func_type=>"double",
35
+ :args=>
36
+ [["const double", "data[]"],
37
+ ["size_t", "stride"],
38
+ ["size_t", "n"],
39
+ ["double", "mean"]],
40
+ :desc=>
41
+ "This function returns the sample variance of data relative to the\n" +
42
+ "given value of mean. The function is computed with \\Hat\\mu\n" +
43
+ "replaced by the value of mean that you supply,\n" +
44
+ "\n" +
45
+ "\\Hat\\sigma^2 = (1/(N-1)) \\sum (x_i - mean)^2"},
46
+ {:func_name=>"gsl_stats_sd",
47
+ :func_type=>"double",
48
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
49
+ :desc=>
50
+ "The standard deviation is defined as the square root of the variance.\n" +
51
+ "These functions return the square root of the corresponding variance\n" +
52
+ "functions above."},
53
+ {:func_name=>"gsl_stats_sd_m",
54
+ :func_type=>"double",
55
+ :args=>
56
+ [["const double", "data[]"],
57
+ ["size_t", "stride"],
58
+ ["size_t", "n"],
59
+ ["double", "mean"]],
60
+ :desc=>
61
+ "The standard deviation is defined as the square root of the variance.\n" +
62
+ "These functions return the square root of the corresponding variance\n" +
63
+ "functions above."},
64
+ {:func_name=>"gsl_stats_tss",
65
+ :func_type=>"double",
66
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
67
+ :desc=>
68
+ "These functions return the total sum of squares (TSS) of data about\n" +
69
+ "the mean. For gsl_stats_tss_m the user-supplied value of\n" +
70
+ "mean is used, and for gsl_stats_tss it is computed using\n" +
71
+ "gsl_stats_mean.\n" +
72
+ "\n" +
73
+ "TSS = \\sum (x_i - mean)^2"},
74
+ {:func_name=>"gsl_stats_tss_m",
75
+ :func_type=>"double",
76
+ :args=>
77
+ [["const double", "data[]"],
78
+ ["size_t", "stride"],
79
+ ["size_t", "n"],
80
+ ["double", "mean"]],
81
+ :desc=>
82
+ "These functions return the total sum of squares (TSS) of data about\n" +
83
+ "the mean. For gsl_stats_tss_m the user-supplied value of\n" +
84
+ "mean is used, and for gsl_stats_tss it is computed using\n" +
85
+ "gsl_stats_mean.\n" +
86
+ "\n" +
87
+ "TSS = \\sum (x_i - mean)^2"},
88
+ {:func_name=>"gsl_stats_variance_with_fixed_mean",
89
+ :func_type=>"double",
90
+ :args=>
91
+ [["const double", "data[]"],
92
+ ["size_t", "stride"],
93
+ ["size_t", "n"],
94
+ ["double", "mean"]],
95
+ :desc=>
96
+ "This function computes an unbiased estimate of the variance of\n" +
97
+ "data when the population mean mean of the underlying\n" +
98
+ "distribution is known a priori. In this case the estimator for\n" +
99
+ "the variance uses the factor 1/N and the sample mean\n" +
100
+ "\\Hat\\mu is replaced by the known population mean \\mu,\n" +
101
+ "\n" +
102
+ "\\Hat\\sigma^2 = (1/N) \\sum (x_i - \\mu)^2"},
103
+ {:func_name=>"gsl_stats_sd_with_fixed_mean",
104
+ :func_type=>"double",
105
+ :args=>
106
+ [["const double", "data[]"],
107
+ ["size_t", "stride"],
108
+ ["size_t", "n"],
109
+ ["double", "mean"]],
110
+ :desc=>
111
+ "This function calculates the standard deviation of data for a\n" +
112
+ "fixed population mean mean. The result is the square root of the\n" +
113
+ "corresponding variance function."},
114
+ {:func_name=>"gsl_stats_absdev",
115
+ :func_type=>"double",
116
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
117
+ :desc=>
118
+ "This function computes the absolute deviation from the mean of\n" +
119
+ "data, a dataset of length n with stride stride. The\n" +
120
+ "absolute deviation from the mean is defined as,\n" +
121
+ "\n" +
122
+ "absdev = (1/N) \\sum |x_i - \\Hat\\mu|\n" +
123
+ "\n" +
124
+ "where x_i are the elements of the dataset data. The\n" +
125
+ "absolute deviation from the mean provides a more robust measure of the\n" +
126
+ "width of a distribution than the variance. This function computes the\n" +
127
+ "mean of data via a call to gsl_stats_mean."},
128
+ {:func_name=>"gsl_stats_absdev_m",
129
+ :func_type=>"double",
130
+ :args=>
131
+ [["const double", "data[]"],
132
+ ["size_t", "stride"],
133
+ ["size_t", "n"],
134
+ ["double", "mean"]],
135
+ :desc=>
136
+ "This function computes the absolute deviation of the dataset data\n" +
137
+ "relative to the given value of mean,\n" +
138
+ "\n" +
139
+ "absdev = (1/N) \\sum |x_i - mean|\n" +
140
+ "\n" +
141
+ "This function is useful if you have already computed the mean of\n" +
142
+ "data (and want to avoid recomputing it), or wish to calculate the\n" +
143
+ "absolute deviation relative to another value (such as zero, or the\n" +
144
+ "median)."},
145
+ {:func_name=>"gsl_stats_skew",
146
+ :func_type=>"double",
147
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
148
+ :desc=>
149
+ "This function computes the skewness of data, a dataset of length\n" +
150
+ "n with stride stride. The skewness is defined as,\n" +
151
+ "\n" +
152
+ "skew = (1/N) \\sum ((x_i - \\Hat\\mu)/\\Hat\\sigma)^3\n" +
153
+ "\n" +
154
+ "where x_i are the elements of the dataset data. The skewness\n" +
155
+ "measures the asymmetry of the tails of a distribution.\n" +
156
+ "\n" +
157
+ "The function computes the mean and estimated standard deviation of\n" +
158
+ "data via calls to gsl_stats_mean and gsl_stats_sd."},
159
+ {:func_name=>"gsl_stats_skew_m_sd",
160
+ :func_type=>"double",
161
+ :args=>
162
+ [["const double", "data[]"],
163
+ ["size_t", "stride"],
164
+ ["size_t", "n"],
165
+ ["double", "mean"],
166
+ ["double", "sd"]],
167
+ :desc=>
168
+ "This function computes the skewness of the dataset data using the\n" +
169
+ "given values of the mean mean and standard deviation sd,\n" +
170
+ "\n" +
171
+ "skew = (1/N) \\sum ((x_i - mean)/sd)^3\n" +
172
+ "\n" +
173
+ "These functions are useful if you have already computed the mean and\n" +
174
+ "standard deviation of data and want to avoid recomputing them."},
175
+ {:func_name=>"gsl_stats_kurtosis",
176
+ :func_type=>"double",
177
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
178
+ :desc=>
179
+ "This function computes the kurtosis of data, a dataset of length\n" +
180
+ "n with stride stride. The kurtosis is defined as,\n" +
181
+ "\n" +
182
+ "kurtosis = ((1/N) \\sum ((x_i - \\Hat\\mu)/\\Hat\\sigma)^4) - 3\n" +
183
+ "\n" +
184
+ "The kurtosis measures how sharply peaked a distribution is, relative to\n" +
185
+ "its width. The kurtosis is normalized to zero for a Gaussian\n" +
186
+ "distribution."},
187
+ {:func_name=>"gsl_stats_kurtosis_m_sd",
188
+ :func_type=>"double",
189
+ :args=>
190
+ [["const double", "data[]"],
191
+ ["size_t", "stride"],
192
+ ["size_t", "n"],
193
+ ["double", "mean"],
194
+ ["double", "sd"]],
195
+ :desc=>
196
+ "This function computes the kurtosis of the dataset data using the\n" +
197
+ "given values of the mean mean and standard deviation sd,\n" +
198
+ "\n" +
199
+ "kurtosis = ((1/N) \\sum ((x_i - mean)/sd)^4) - 3\n" +
200
+ "\n" +
201
+ "This function is useful if you have already computed the mean and\n" +
202
+ "standard deviation of data and want to avoid recomputing them."},
203
+ {:func_name=>"gsl_stats_lag1_autocorrelation",
204
+ :func_type=>"double",
205
+ :args=>
206
+ [["const double", "data[]"],
207
+ ["const size_t", "stride"],
208
+ ["const size_t", "n"]],
209
+ :desc=>
210
+ "This function computes the lag-1 autocorrelation of the dataset data.\n" +
211
+ "\n" +
212
+ "a_1 = @{\\sum_@{i = 1@}^@{n@} (x_@{i@} - \\Hat\\mu) (x_@{i-1@} - \\Hat\\mu)\n" +
213
+ " \\over\n" +
214
+ " \\sum_@{i = 1@}^@{n@} (x_@{i@} - \\Hat\\mu) (x_@{i@} - \\Hat\\mu)@}"},
215
+ {:func_name=>"gsl_stats_lag1_autocorrelation_m",
216
+ :func_type=>"double",
217
+ :args=>
218
+ [["const double", "data[]"],
219
+ ["const size_t", "stride"],
220
+ ["const size_t", "n"],
221
+ ["const double", "mean"]],
222
+ :desc=>
223
+ "This function computes the lag-1 autocorrelation of the dataset\n" +
224
+ "data using the given value of the mean mean.\n"},
225
+ {:func_name=>"gsl_stats_covariance",
226
+ :func_type=>"double",
227
+ :args=>
228
+ [["const double", "data1[]"],
229
+ ["const size_t", "stride1"],
230
+ ["const double", "data2[]"],
231
+ ["const size_t", "stride2"],
232
+ ["const size_t", "n"]],
233
+ :desc=>
234
+ "This function computes the covariance of the datasets data1 and\n" +
235
+ "data2 which must both be of the same length n.\n" +
236
+ "\n" +
237
+ "covar = (1/(n - 1)) \\sum_@{i = 1@}^@{n@} (x_i - \\Hat x) (y_i - \\Hat y)"},
238
+ {:func_name=>"gsl_stats_covariance_m",
239
+ :func_type=>"double",
240
+ :args=>
241
+ [["const double", "data1[]"],
242
+ ["const size_t", "stride1"],
243
+ ["const double", "data2[]"],
244
+ ["const size_t", "stride2"],
245
+ ["const size_t", "n"],
246
+ ["const double", "mean1"],
247
+ ["const double", "mean2"]],
248
+ :desc=>
249
+ "This function computes the covariance of the datasets data1 and\n" +
250
+ "data2 using the given values of the means, mean1 and\n" +
251
+ "mean2. This is useful if you have already computed the means of\n" +
252
+ "data1 and data2 and want to avoid recomputing them."},
253
+ {:func_name=>"gsl_stats_correlation",
254
+ :func_type=>"double",
255
+ :args=>
256
+ [["const double", "data1[]"],
257
+ ["const size_t", "stride1"],
258
+ ["const double", "data2[]"],
259
+ ["const size_t", "stride2"],
260
+ ["const size_t", "n"]],
261
+ :desc=>
262
+ "This function efficiently computes the Pearson correlation coefficient\n" +
263
+ "between the datasets data1 and data2 which must both be of\n" +
264
+ "the same length n.\n" +
265
+ "r = cov(x, y) / (\\Hat\\sigma_x \\Hat\\sigma_y)\n" +
266
+ " = @{1/(n-1) \\sum (x_i - \\Hat x) (y_i - \\Hat y)\n" +
267
+ " \\over\n" +
268
+ " \\sqrt@{1/(n-1) \\sum (x_i - \\Hat x)^2@} \\sqrt@{1/(n-1) \\sum (y_i - \\Hat y)^2@}\n" +
269
+ " @}"},
270
+ {:func_name=>"gsl_stats_spearman",
271
+ :func_type=>"double",
272
+ :args=>
273
+ [["const double", "data1[]"],
274
+ ["const size_t", "stride1"],
275
+ ["const double", "data2[]"],
276
+ ["const size_t", "stride2"],
277
+ ["const size_t", "n"],
278
+ ["double", "work[]"]],
279
+ :desc=>
280
+ "This function computes the Spearman rank correlation coefficient between\n" +
281
+ "the datasets data1 and data2 which must both be of the same\n" +
282
+ "length n. Additional workspace of size 2*n is required in\n" +
283
+ "work. The Spearman rank correlation between vectors x and\n" +
284
+ "y is equivalent to the Pearson correlation between the ranked\n" +
285
+ "vectors x_R and y_R, where ranks are defined to be the\n" +
286
+ "average of the positions of an element in the ascending order of the values."},
287
+ {:func_name=>"gsl_stats_wmean",
288
+ :func_type=>"double",
289
+ :args=>
290
+ [["const double", "w[]"],
291
+ ["size_t", "wstride"],
292
+ ["const double", "data[]"],
293
+ ["size_t", "stride"],
294
+ ["size_t", "n"]],
295
+ :desc=>
296
+ "This function returns the weighted mean of the dataset data with\n" +
297
+ "stride stride and length n, using the set of weights w\n" +
298
+ "with stride wstride and length n. The weighted mean is defined as,\n" +
299
+ "\n" +
300
+ "\\Hat\\mu = (\\sum w_i x_i) / (\\sum w_i)"},
301
+ {:func_name=>"gsl_stats_wvariance",
302
+ :func_type=>"double",
303
+ :args=>
304
+ [["const double", "w[]"],
305
+ ["size_t", "wstride"],
306
+ ["const double", "data[]"],
307
+ ["size_t", "stride"],
308
+ ["size_t", "n"]],
309
+ :desc=>
310
+ "This function returns the estimated variance of the dataset data\n" +
311
+ "with stride stride and length n, using the set of weights\n" +
312
+ "w with stride wstride and length n. The estimated\n" +
313
+ "variance of a weighted dataset is calculated as,\n" +
314
+ "\n" +
315
+ "\\Hat\\sigma^2 = ((\\sum w_i)/((\\sum w_i)^2 - \\sum (w_i^2))) \n" +
316
+ " \\sum w_i (x_i - \\Hat\\mu)^2\n" +
317
+ "\n" +
318
+ "Note that this expression reduces to an unweighted variance with the\n" +
319
+ "familiar 1/(N-1) factor when there are N equal non-zero\n" +
320
+ "weights."},
321
+ {:func_name=>"gsl_stats_wvariance_m",
322
+ :func_type=>"double",
323
+ :args=>
324
+ [["const double", "w[]"],
325
+ ["size_t", "wstride"],
326
+ ["const double", "data[]"],
327
+ ["size_t", "stride"],
328
+ ["size_t", "n"],
329
+ ["double", "wmean"]],
330
+ :desc=>
331
+ "This function returns the estimated variance of the weighted dataset\n" +
332
+ "data using the given weighted mean wmean."},
333
+ {:func_name=>"gsl_stats_wsd",
334
+ :func_type=>"double",
335
+ :args=>
336
+ [["const double", "w[]"],
337
+ ["size_t", "wstride"],
338
+ ["const double", "data[]"],
339
+ ["size_t", "stride"],
340
+ ["size_t", "n"]],
341
+ :desc=>
342
+ "The standard deviation is defined as the square root of the variance.\n" +
343
+ "This function returns the square root of the corresponding variance\n" +
344
+ "function gsl_stats_wvariance above."},
345
+ {:func_name=>"gsl_stats_wsd_m",
346
+ :func_type=>"double",
347
+ :args=>
348
+ [["const double", "w[]"],
349
+ ["size_t", "wstride"],
350
+ ["const double", "data[]"],
351
+ ["size_t", "stride"],
352
+ ["size_t", "n"],
353
+ ["double", "wmean"]],
354
+ :desc=>
355
+ "This function returns the square root of the corresponding variance\n" +
356
+ "function gsl_stats_wvariance_m above."},
357
+ {:func_name=>"gsl_stats_wvariance_with_fixed_mean",
358
+ :func_type=>"double",
359
+ :args=>
360
+ [["const double", "w[]"],
361
+ ["size_t", "wstride"],
362
+ ["const double", "data[]"],
363
+ ["size_t", "stride"],
364
+ ["size_t", "n"],
365
+ ["const double", "mean"]],
366
+ :desc=>
367
+ "This function computes an unbiased estimate of the variance of the weighted\n" +
368
+ "dataset data when the population mean mean of the underlying\n" +
369
+ "distribution is known a priori. In this case the estimator for\n" +
370
+ "the variance replaces the sample mean \\Hat\\mu by the known\n" +
371
+ "population mean \\mu,\n" +
372
+ "\n" +
373
+ "\\Hat\\sigma^2 = (\\sum w_i (x_i - \\mu)^2) / (\\sum w_i)"},
374
+ {:func_name=>"gsl_stats_wsd_with_fixed_mean",
375
+ :func_type=>"double",
376
+ :args=>
377
+ [["const double", "w[]"],
378
+ ["size_t", "wstride"],
379
+ ["const double", "data[]"],
380
+ ["size_t", "stride"],
381
+ ["size_t", "n"],
382
+ ["const double", "mean"]],
383
+ :desc=>
384
+ "The standard deviation is defined as the square root of the variance.\n" +
385
+ "This function returns the square root of the corresponding variance\n" +
386
+ "function above."},
387
+ {:func_name=>"gsl_stats_wtss",
388
+ :func_type=>"double",
389
+ :args=>
390
+ [["const double", "w[]"],
391
+ ["const size_t", "wstride"],
392
+ ["const double", "data[]"],
393
+ ["size_t", "stride"],
394
+ ["size_t", "n"]],
395
+ :desc=>
396
+ "These functions return the weighted total sum of squares (TSS) of\n" +
397
+ "data about the weighted mean. For gsl_stats_wtss_m the\n" +
398
+ "user-supplied value of wmean is used, and for gsl_stats_wtss\n" +
399
+ "it is computed using gsl_stats_wmean.\n" +
400
+ "\n" +
401
+ "TSS = \\sum w_i (x_i - wmean)^2"},
402
+ {:func_name=>"gsl_stats_wtss_m",
403
+ :func_type=>"double",
404
+ :args=>
405
+ [["const double", "w[]"],
406
+ ["const size_t", "wstride"],
407
+ ["const double", "data[]"],
408
+ ["size_t", "stride"],
409
+ ["size_t", "n"],
410
+ ["double", "wmean"]],
411
+ :desc=>
412
+ "These functions return the weighted total sum of squares (TSS) of\n" +
413
+ "data about the weighted mean. For gsl_stats_wtss_m the\n" +
414
+ "user-supplied value of wmean is used, and for gsl_stats_wtss\n" +
415
+ "it is computed using gsl_stats_wmean.\n" +
416
+ "\n" +
417
+ "TSS = \\sum w_i (x_i - wmean)^2"},
418
+ {:func_name=>"gsl_stats_wabsdev",
419
+ :func_type=>"double",
420
+ :args=>
421
+ [["const double", "w[]"],
422
+ ["size_t", "wstride"],
423
+ ["const double", "data[]"],
424
+ ["size_t", "stride"],
425
+ ["size_t", "n"]],
426
+ :desc=>
427
+ "This function computes the weighted absolute deviation from the weighted\n" +
428
+ "mean of data. The absolute deviation from the mean is defined as,\n" +
429
+ "\n" +
430
+ "absdev = (\\sum w_i |x_i - \\Hat\\mu|) / (\\sum w_i)"},
431
+ {:func_name=>"gsl_stats_wabsdev_m",
432
+ :func_type=>"double",
433
+ :args=>
434
+ [["const double", "w[]"],
435
+ ["size_t", "wstride"],
436
+ ["const double", "data[]"],
437
+ ["size_t", "stride"],
438
+ ["size_t", "n"],
439
+ ["double", "wmean"]],
440
+ :desc=>
441
+ "This function computes the absolute deviation of the weighted dataset\n" +
442
+ "data about the given weighted mean wmean."},
443
+ {:func_name=>"gsl_stats_wskew",
444
+ :func_type=>"double",
445
+ :args=>
446
+ [["const double", "w[]"],
447
+ ["size_t", "wstride"],
448
+ ["const double", "data[]"],
449
+ ["size_t", "stride"],
450
+ ["size_t", "n"]],
451
+ :desc=>
452
+ "This function computes the weighted skewness of the dataset data.\n" +
453
+ "\n" +
454
+ "skew = (\\sum w_i ((x_i - \\Hat x)/\\Hat \\sigma)^3) / (\\sum w_i)"},
455
+ {:func_name=>"gsl_stats_wskew_m_sd",
456
+ :func_type=>"double",
457
+ :args=>
458
+ [["const double", "w[]"],
459
+ ["size_t", "wstride"],
460
+ ["const double", "data[]"],
461
+ ["size_t", "stride"],
462
+ ["size_t", "n"],
463
+ ["double", "wmean"],
464
+ ["double", "wsd"]],
465
+ :desc=>
466
+ "This function computes the weighted skewness of the dataset data\n" +
467
+ "using the given values of the weighted mean and weighted standard\n" +
468
+ "deviation, wmean and wsd."},
469
+ {:func_name=>"gsl_stats_wkurtosis",
470
+ :func_type=>"double",
471
+ :args=>
472
+ [["const double", "w[]"],
473
+ ["size_t", "wstride"],
474
+ ["const double", "data[]"],
475
+ ["size_t", "stride"],
476
+ ["size_t", "n"]],
477
+ :desc=>
478
+ "This function computes the weighted kurtosis of the dataset data.\n" +
479
+ "\n" +
480
+ "kurtosis = ((\\sum w_i ((x_i - \\Hat x)/\\Hat \\sigma)^4) / (\\sum w_i)) - 3"},
481
+ {:func_name=>"gsl_stats_wkurtosis_m_sd",
482
+ :func_type=>"double",
483
+ :args=>
484
+ [["const double", "w[]"],
485
+ ["size_t", "wstride"],
486
+ ["const double", "data[]"],
487
+ ["size_t", "stride"],
488
+ ["size_t", "n"],
489
+ ["double", "wmean"],
490
+ ["double", "wsd"]],
491
+ :desc=>
492
+ "This function computes the weighted kurtosis of the dataset data\n" +
493
+ "using the given values of the weighted mean and weighted standard\n" +
494
+ "deviation, wmean and wsd."},
495
+ {:func_name=>"gsl_stats_max",
496
+ :func_type=>"double",
497
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
498
+ :desc=>
499
+ "This function returns the maximum value in data, a dataset of\n" +
500
+ "length n with stride stride. The maximum value is defined\n" +
501
+ "as the value of the element x_i which satisfies $x_i \\ge x_j$\n" +
502
+ "x_i >= x_j for all j.\n" +
503
+ "\n" +
504
+ "If you want instead to find the element with the largest absolute\n" +
505
+ "magnitude you will need to apply fabs or abs to your data\n" +
506
+ "before calling this function."},
507
+ {:func_name=>"gsl_stats_min",
508
+ :func_type=>"double",
509
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
510
+ :desc=>
511
+ "This function returns the minimum value in data, a dataset of\n" +
512
+ "length n with stride stride. The minimum value is defined\n" +
513
+ "as the value of the element x_i which satisfies $x_i \\le x_j$\n" +
514
+ "x_i <= x_j for all j.\n" +
515
+ "\n" +
516
+ "If you want instead to find the element with the smallest absolute\n" +
517
+ "magnitude you will need to apply fabs or abs to your data\n" +
518
+ "before calling this function."},
519
+ {:func_name=>"gsl_stats_minmax",
520
+ :func_type=>"void",
521
+ :args=>
522
+ [["double *", "min"],
523
+ ["double *", "max"],
524
+ ["const double", "data[]"],
525
+ ["size_t", "stride"],
526
+ ["size_t", "n"]],
527
+ :desc=>
528
+ "This function finds both the minimum and maximum values min,\n" +
529
+ "max in data in a single pass."},
530
+ {:func_name=>"gsl_stats_max_index",
531
+ :func_type=>"size_t",
532
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
533
+ :desc=>
534
+ "This function returns the index of the maximum value in data, a\n" +
535
+ "dataset of length n with stride stride. The maximum value is\n" +
536
+ "defined as the value of the element x_i which satisfies \n" +
537
+ "$x_i \\ge x_j$\n" +
538
+ "x_i >= x_j for all j. When there are several equal maximum\n" +
539
+ "elements then the first one is chosen."},
540
+ {:func_name=>"gsl_stats_min_index",
541
+ :func_type=>"size_t",
542
+ :args=>[["const double", "data[]"], ["size_t", "stride"], ["size_t", "n"]],
543
+ :desc=>
544
+ "This function returns the index of the minimum value in data, a\n" +
545
+ "dataset of length n with stride stride. The minimum value\n" +
546
+ "is defined as the value of the element x_i which satisfies\n" +
547
+ "$x_i \\ge x_j$\n" +
548
+ "x_i >= x_j for all j. When there are several equal\n" +
549
+ "minimum elements then the first one is chosen."},
550
+ {:func_name=>"gsl_stats_minmax_index",
551
+ :func_type=>"void",
552
+ :args=>
553
+ [["size_t *", "min_index"],
554
+ ["size_t *", "max_index"],
555
+ ["const double", "data[]"],
556
+ ["size_t", "stride"],
557
+ ["size_t", "n"]],
558
+ :desc=>
559
+ "This function returns the indexes min_index, max_index of\n" +
560
+ "the minimum and maximum values in data in a single pass."},
561
+ {:func_name=>"gsl_stats_median_from_sorted_data",
562
+ :func_type=>"double",
563
+ :args=>
564
+ [["const double", "sorted_data[]"], ["size_t", "stride"], ["size_t", "n"]],
565
+ :desc=>
566
+ "This function returns the median value of sorted_data, a dataset\n" +
567
+ "of length n with stride stride. The elements of the array\n" +
568
+ "must be in ascending numerical order. There are no checks to see\n" +
569
+ "whether the data are sorted, so the function gsl_sort should\n" +
570
+ "always be used first.\n" +
571
+ "\n" +
572
+ "When the dataset has an odd number of elements the median is the value\n" +
573
+ "of element (n-1)/2. When the dataset has an even number of\n" +
574
+ "elements the median is the mean of the two nearest middle values,\n" +
575
+ "elements (n-1)/2 and n/2. Since the algorithm for\n" +
576
+ "computing the median involves interpolation this function always returns\n" +
577
+ "a floating-point number, even for integer data types."},
578
+ {:func_name=>"gsl_stats_quantile_from_sorted_data",
579
+ :func_type=>"double",
580
+ :args=>
581
+ [["const double", "sorted_data[]"],
582
+ ["size_t", "stride"],
583
+ ["size_t", "n"],
584
+ ["double", "f"]],
585
+ :desc=>
586
+ "This function returns a quantile value of sorted_data, a\n" +
587
+ "double-precision array of length n with stride stride. The\n" +
588
+ "elements of the array must be in ascending numerical order. The\n" +
589
+ "quantile is determined by the f, a fraction between 0 and 1. For\n" +
590
+ "example, to compute the value of the 75th percentile f should have\n" +
591
+ "the value 0.75.\n" +
592
+ "\n" +
593
+ "There are no checks to see whether the data are sorted, so the function\n" +
594
+ "gsl_sort should always be used first.\n" +
595
+ "\n" +
596
+ "The quantile is found by interpolation, using the formula\n" +
597
+ "\n" +
598
+ "quantile = (1 - \\delta) x_i + \\delta x_@{i+1@}\n" +
599
+ "\n" +
600
+ "where i is floor((n - 1)f) and \\delta is\n" +
601
+ "(n-1)f - i.\n" +
602
+ "\n" +
603
+ "Thus the minimum value of the array (data[0*stride]) is given by\n" +
604
+ "f equal to zero, the maximum value (data[(n-1)*stride]) is\n" +
605
+ "given by f equal to one and the median value is given by f\n" +
606
+ "equal to 0.5. Since the algorithm for computing quantiles involves\n" +
607
+ "interpolation this function always returns a floating-point number, even\n" +
608
+ "for integer data types."}]