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,9 @@
1
+ require_relative '../extconf_gsl.rb'
2
+
3
+ # source file to compile
4
+ srcs = %w(
5
+ gsl_multifit
6
+ )
7
+ $objs = srcs.collect{|i| i+".o"}
8
+
9
+ create_makefile('numo/gsl/multifit')
@@ -0,0 +1,1035 @@
1
+ [{:func_name=>"gsl_multifit_linear_alloc",
2
+ :func_type=>"gsl_multifit_linear_workspace *",
3
+ :args=>[["const size_t", "n"], ["const size_t", "p"]],
4
+ :desc=>
5
+ "This function allocates a workspace for fitting a model to a maximum of n\n" +
6
+ "observations using a maximum of p parameters. The user may later supply\n" +
7
+ "a smaller least squares system if desired. The size of the workspace is\n" +
8
+ "O(np + p^2)."},
9
+ {:func_name=>"gsl_multifit_linear_free",
10
+ :func_type=>"void",
11
+ :args=>[["gsl_multifit_linear_workspace *", "work"]],
12
+ :desc=>"This function frees the memory associated with the workspace w."},
13
+ {:func_name=>"gsl_multifit_linear_svd",
14
+ :func_type=>"int",
15
+ :args=>
16
+ [["const gsl_matrix *", "X"], ["gsl_multifit_linear_workspace *", "work"]],
17
+ :desc=>
18
+ "This function performs a singular value decomposition of the\n" +
19
+ "matrix X and stores the SVD factors internally in work."},
20
+ {:func_name=>"gsl_multifit_linear_bsvd",
21
+ :func_type=>"int",
22
+ :args=>
23
+ [["const gsl_matrix *", "X"], ["gsl_multifit_linear_workspace *", "work"]],
24
+ :desc=>
25
+ "This function performs a singular value decomposition of the\n" +
26
+ "matrix X and stores the SVD factors internally in work.\n" +
27
+ "The matrix X is first balanced by applying column scaling\n" +
28
+ "factors to improve the accuracy of the singular values."},
29
+ {:func_name=>"gsl_multifit_linear",
30
+ :func_type=>"int",
31
+ :args=>
32
+ [["const gsl_matrix *", "X"],
33
+ ["const gsl_vector *", "y"],
34
+ ["gsl_vector *", "c"],
35
+ ["gsl_matrix *", "cov"],
36
+ ["double *", "chisq"],
37
+ ["gsl_multifit_linear_workspace *", "work"]],
38
+ :desc=>
39
+ "This function computes the best-fit parameters c of the model\n" +
40
+ "y = X c for the observations y and the matrix of\n" +
41
+ "predictor variables X, using the preallocated workspace provided\n" +
42
+ "in work. The p-by-p variance-covariance matrix of the model parameters\n" +
43
+ "cov is set to \\sigma^2 (X^T X)^{-1}, where \\sigma is\n" +
44
+ "the standard deviation of the fit residuals.\n" +
45
+ "The sum of squares of the residuals from the best-fit,\n" +
46
+ "\\chi^2, is returned in chisq. If the coefficient of\n" +
47
+ "determination is desired, it can be computed from the expression\n" +
48
+ "R^2 = 1 - \\chi^2 / TSS, where the total sum of squares (TSS) of\n" +
49
+ "the observations y may be computed from gsl_stats_tss.\n" +
50
+ "\n" +
51
+ "The best-fit is found by singular value decomposition of the matrix\n" +
52
+ "X using the modified Golub-Reinsch SVD algorithm, with column\n" +
53
+ "scaling to improve the accuracy of the singular values. Any components\n" +
54
+ "which have zero singular value (to machine precision) are discarded\n" +
55
+ "from the fit."},
56
+ {:func_name=>"gsl_multifit_wlinear",
57
+ :func_type=>"int",
58
+ :args=>
59
+ [["const gsl_matrix *", "X"],
60
+ ["const gsl_vector *", "w"],
61
+ ["const gsl_vector *", "y"],
62
+ ["gsl_vector *", "c"],
63
+ ["gsl_matrix *", "cov"],
64
+ ["double *", "chisq"],
65
+ ["gsl_multifit_linear_workspace *", "work"]],
66
+ :desc=>
67
+ "This function computes the best-fit parameters c of the weighted\n" +
68
+ "model y = X c for the observations y with weights w\n" +
69
+ "and the matrix of predictor variables X, using the preallocated\n" +
70
+ "workspace provided in work. The p-by-p covariance matrix of the model\n" +
71
+ "parameters cov is computed as (X^T W X)^{-1}. The weighted\n" +
72
+ "sum of squares of the residuals from the best-fit, \\chi^2, is\n" +
73
+ "returned in chisq. If the coefficient of determination is\n" +
74
+ "desired, it can be computed from the expression R^2 = 1 - \\chi^2\n" +
75
+ "/ WTSS, where the weighted total sum of squares (WTSS) of the\n" +
76
+ "observations y may be computed from gsl_stats_wtss."},
77
+ {:func_name=>"gsl_multifit_linear_est",
78
+ :func_type=>"int",
79
+ :args=>
80
+ [["const gsl_vector *", "x"],
81
+ ["const gsl_vector *", "c"],
82
+ ["const gsl_matrix *", "cov"],
83
+ ["double *", "y"],
84
+ ["double *", "y_err"]],
85
+ :desc=>
86
+ "This function uses the best-fit multilinear regression coefficients\n" +
87
+ "c and their covariance matrix\n" +
88
+ "cov to compute the fitted function value\n" +
89
+ "y and its standard deviation y_err for the model y = x.c \n" +
90
+ "at the point x."},
91
+ {:func_name=>"gsl_multifit_linear_residuals",
92
+ :func_type=>"int",
93
+ :args=>
94
+ [["const gsl_matrix *", "X"],
95
+ ["const gsl_vector *", "y"],
96
+ ["const gsl_vector *", "c"],
97
+ ["gsl_vector *", "r"]],
98
+ :desc=>
99
+ "This function computes the vector of residuals r = y - X c for\n" +
100
+ "the observations y, coefficients c and matrix of predictor\n" +
101
+ "variables X."},
102
+ {:func_name=>"gsl_multifit_linear_stdform1",
103
+ :func_type=>"int",
104
+ :args=>
105
+ [["const gsl_vector *", "L"],
106
+ ["const gsl_matrix *", "X"],
107
+ ["const gsl_vector *", "y"],
108
+ ["gsl_matrix *", "Xs"],
109
+ ["gsl_vector *", "ys"],
110
+ ["gsl_multifit_linear_workspace *", "work"]],
111
+ :desc=>
112
+ "These functions define a regularization matrix\n" +
113
+ "L = diag(l_0,l_1,...,l_{p-1}).\n" +
114
+ "The diagonal matrix element l_i is provided by the\n" +
115
+ "ith element of the input vector L.\n" +
116
+ "The n-by-p least squares matrix X and\n" +
117
+ "vector y of length n are then\n" +
118
+ "converted to standard form as described above and the parameters\n" +
119
+ "(\\tilde{X},\\tilde{y}) are stored in Xs and ys\n" +
120
+ "on output. Xs and ys have the same dimensions as\n" +
121
+ "X and y. Optional data weights may be supplied in the\n" +
122
+ "vector w of length n. In order to apply this transformation,\n" +
123
+ "L^{-1} must exist and so none of the l_i\n" +
124
+ "may be zero. After the standard form system has been solved,\n" +
125
+ "use gsl_multifit_linear_genform1 to recover the original solution vector.\n" +
126
+ "It is allowed to have X = Xs and y = ys for an in-place transform.\n" +
127
+ "In order to perform a weighted regularized fit with L = I, the user may\n" +
128
+ "call gsl_multifit_linear_applyW to convert to standard form."},
129
+ {:func_name=>"gsl_multifit_linear_wstdform1",
130
+ :func_type=>"int",
131
+ :args=>
132
+ [["const gsl_vector *", "L"],
133
+ ["const gsl_matrix *", "X"],
134
+ ["const gsl_vector *", "w"],
135
+ ["const gsl_vector *", "y"],
136
+ ["gsl_matrix *", "Xs"],
137
+ ["gsl_vector *", "ys"],
138
+ ["gsl_multifit_linear_workspace *", "work"]],
139
+ :desc=>
140
+ "These functions define a regularization matrix\n" +
141
+ "L = diag(l_0,l_1,...,l_{p-1}).\n" +
142
+ "The diagonal matrix element l_i is provided by the\n" +
143
+ "ith element of the input vector L.\n" +
144
+ "The n-by-p least squares matrix X and\n" +
145
+ "vector y of length n are then\n" +
146
+ "converted to standard form as described above and the parameters\n" +
147
+ "(\\tilde{X},\\tilde{y}) are stored in Xs and ys\n" +
148
+ "on output. Xs and ys have the same dimensions as\n" +
149
+ "X and y. Optional data weights may be supplied in the\n" +
150
+ "vector w of length n. In order to apply this transformation,\n" +
151
+ "L^{-1} must exist and so none of the l_i\n" +
152
+ "may be zero. After the standard form system has been solved,\n" +
153
+ "use gsl_multifit_linear_genform1 to recover the original solution vector.\n" +
154
+ "It is allowed to have X = Xs and y = ys for an in-place transform.\n" +
155
+ "In order to perform a weighted regularized fit with L = I, the user may\n" +
156
+ "call gsl_multifit_linear_applyW to convert to standard form."},
157
+ {:func_name=>"gsl_multifit_linear_L_decomp",
158
+ :func_type=>"int",
159
+ :args=>[["gsl_matrix *", "L"], ["gsl_vector *", "tau"]],
160
+ :desc=>
161
+ "This function factors the m-by-p regularization matrix\n" +
162
+ "L into a form needed for the later transformation to standard form. L\n" +
163
+ "may have any number of rows m. If m \\ge p the QR decomposition of\n" +
164
+ "L is computed and stored in L on output. If m < p, the QR decomposition\n" +
165
+ "of L^T is computed and stored in L on output. On output,\n" +
166
+ "the Householder scalars are stored in the vector tau of size MIN(m,p).\n" +
167
+ "These outputs will be used by gsl_multifit_linear_wstdform2 to complete the\n" +
168
+ "transformation to standard form."},
169
+ {:func_name=>"gsl_multifit_linear_stdform2",
170
+ :func_type=>"int",
171
+ :args=>
172
+ [["const gsl_matrix *", "LQR"],
173
+ ["const gsl_vector *", "Ltau"],
174
+ ["const gsl_matrix *", "X"],
175
+ ["const gsl_vector *", "y"],
176
+ ["gsl_matrix *", "Xs"],
177
+ ["gsl_vector *", "ys"],
178
+ ["gsl_matrix *", "M"],
179
+ ["gsl_multifit_linear_workspace *", "work"]],
180
+ :desc=>
181
+ "These functions convert the least squares system (X,y,W,L) to standard\n" +
182
+ "form (\\tilde{X},\\tilde{y}) which are stored in Xs and ys\n" +
183
+ "respectively. The m-by-p regularization matrix L is specified by the inputs\n" +
184
+ "LQR and Ltau, which are outputs from gsl_multifit_linear_L_decomp.\n" +
185
+ "The dimensions of the standard form parameters (\\tilde{X},\\tilde{y})\n" +
186
+ "depend on whether m is larger or less than p. For m \\ge p,\n" +
187
+ "Xs is n-by-p, ys is n-by-1, and M is\n" +
188
+ "not used. For m < p, Xs is (n - p + m)-by-m,\n" +
189
+ "ys is (n - p + m)-by-1, and M is additional n-by-p workspace,\n" +
190
+ "which is required to recover the original solution vector after the system has been\n" +
191
+ "solved (see gsl_multifit_linear_genform2). Optional data weights may be supplied in the\n" +
192
+ "vector w of length n, where W = diag(w)."},
193
+ {:func_name=>"gsl_multifit_linear_wstdform2",
194
+ :func_type=>"int",
195
+ :args=>
196
+ [["const gsl_matrix *", "LQR"],
197
+ ["const gsl_vector *", "Ltau"],
198
+ ["const gsl_matrix *", "X"],
199
+ ["const gsl_vector *", "w"],
200
+ ["const gsl_vector *", "y"],
201
+ ["gsl_matrix *", "Xs"],
202
+ ["gsl_vector *", "ys"],
203
+ ["gsl_matrix *", "M"],
204
+ ["gsl_multifit_linear_workspace *", "work"]],
205
+ :desc=>
206
+ "These functions convert the least squares system (X,y,W,L) to standard\n" +
207
+ "form (\\tilde{X},\\tilde{y}) which are stored in Xs and ys\n" +
208
+ "respectively. The m-by-p regularization matrix L is specified by the inputs\n" +
209
+ "LQR and Ltau, which are outputs from gsl_multifit_linear_L_decomp.\n" +
210
+ "The dimensions of the standard form parameters (\\tilde{X},\\tilde{y})\n" +
211
+ "depend on whether m is larger or less than p. For m \\ge p,\n" +
212
+ "Xs is n-by-p, ys is n-by-1, and M is\n" +
213
+ "not used. For m < p, Xs is (n - p + m)-by-m,\n" +
214
+ "ys is (n - p + m)-by-1, and M is additional n-by-p workspace,\n" +
215
+ "which is required to recover the original solution vector after the system has been\n" +
216
+ "solved (see gsl_multifit_linear_genform2). Optional data weights may be supplied in the\n" +
217
+ "vector w of length n, where W = diag(w)."},
218
+ {:func_name=>"gsl_multifit_linear_solve",
219
+ :func_type=>"int",
220
+ :args=>
221
+ [["const double", "lambda"],
222
+ ["const gsl_matrix *", "Xs"],
223
+ ["const gsl_vector *", "ys"],
224
+ ["gsl_vector *", "cs"],
225
+ ["double *", "rnorm"],
226
+ ["double *", "snorm"],
227
+ ["gsl_multifit_linear_workspace *", "work"]],
228
+ :desc=>
229
+ "This function computes the regularized best-fit parameters \\tilde{c}\n" +
230
+ "which minimize the cost function\n" +
231
+ "\\chi^2 = || \\tilde{y} - \\tilde{X} \\tilde{c} ||^2 + \\lambda^2 || \\tilde{c} ||^2 which is\n" +
232
+ "in standard form. The least squares system must therefore be converted\n" +
233
+ "to standard form prior to calling this function.\n" +
234
+ "The observation vector \\tilde{y} is provided in ys and the matrix of\n" +
235
+ "predictor variables \\tilde{X} in Xs. The solution vector \\tilde{c} is\n" +
236
+ "returned in cs, which has length min(m,p). The SVD of Xs must be computed prior\n" +
237
+ "to calling this function, using gsl_multifit_linear_svd.\n" +
238
+ "The regularization parameter \\lambda is provided in lambda.\n" +
239
+ "The residual norm || \\tilde{y} - \\tilde{X} \\tilde{c} || = ||y - X c||_W is returned in rnorm.\n" +
240
+ "The solution norm || \\tilde{c} || = ||L c|| is returned in\n" +
241
+ "snorm."},
242
+ {:func_name=>"gsl_multifit_linear_genform1",
243
+ :func_type=>"int",
244
+ :args=>
245
+ [["const gsl_vector *", "L"],
246
+ ["const gsl_vector *", "cs"],
247
+ ["gsl_vector *", "c"],
248
+ ["gsl_multifit_linear_workspace *", "work"]],
249
+ :desc=>
250
+ "After a regularized system has been solved with\n" +
251
+ "L = diag(\\l_0,\\l_1,...,\\l_{p-1}),\n" +
252
+ "this function backtransforms the standard form solution vector cs\n" +
253
+ "to recover the solution vector of the original problem c. The\n" +
254
+ "diagonal matrix elements l_i are provided in\n" +
255
+ "the vector L. It is allowed to have c = cs for an\n" +
256
+ "in-place transform."},
257
+ {:func_name=>"gsl_multifit_linear_genform2",
258
+ :func_type=>"int",
259
+ :args=>
260
+ [["const gsl_matrix *", "LQR"],
261
+ ["const gsl_vector *", "Ltau"],
262
+ ["const gsl_matrix *", "X"],
263
+ ["const gsl_vector *", "y"],
264
+ ["const gsl_vector *", "cs"],
265
+ ["const gsl_matrix *", "M"],
266
+ ["gsl_vector *", "c"],
267
+ ["gsl_multifit_linear_workspace *", "work"]],
268
+ :desc=>
269
+ "After a regularized system has been solved with a general rectangular matrix L,\n" +
270
+ "specified by (LQR,Ltau), this function backtransforms the standard form solution cs\n" +
271
+ "to recover the solution vector of the original problem, which is stored in c,\n" +
272
+ "of length p. The original least squares matrix and observation vector are provided in\n" +
273
+ "X and y respectively. M is the matrix computed by\n" +
274
+ "gsl_multifit_linear_stdform2. For weighted fits, the weight vector\n" +
275
+ "w must also be supplied."},
276
+ {:func_name=>"gsl_multifit_linear_wgenform2",
277
+ :func_type=>"int",
278
+ :args=>
279
+ [["const gsl_matrix *", "LQR"],
280
+ ["const gsl_vector *", "Ltau"],
281
+ ["const gsl_matrix *", "X"],
282
+ ["const gsl_vector *", "w"],
283
+ ["const gsl_vector *", "y"],
284
+ ["const gsl_vector *", "cs"],
285
+ ["const gsl_matrix *", "M"],
286
+ ["gsl_vector *", "c"],
287
+ ["gsl_multifit_linear_workspace *", "work"]],
288
+ :desc=>
289
+ "After a regularized system has been solved with a general rectangular matrix L,\n" +
290
+ "specified by (LQR,Ltau), this function backtransforms the standard form solution cs\n" +
291
+ "to recover the solution vector of the original problem, which is stored in c,\n" +
292
+ "of length p. The original least squares matrix and observation vector are provided in\n" +
293
+ "X and y respectively. M is the matrix computed by\n" +
294
+ "gsl_multifit_linear_stdform2. For weighted fits, the weight vector\n" +
295
+ "w must also be supplied."},
296
+ {:func_name=>"gsl_multifit_linear_applyW",
297
+ :func_type=>"int",
298
+ :args=>
299
+ [["const gsl_matrix *", "X"],
300
+ ["const gsl_vector *", "w"],
301
+ ["const gsl_vector *", "y"],
302
+ ["gsl_matrix *", "WX"],
303
+ ["gsl_vector *", "Wy"],
304
+ ["gsl_multifit_linear_workspace *", "work"]],
305
+ :desc=>
306
+ "For weighted least squares systems with L = I, this function may be used to\n" +
307
+ "convert the system to standard form by applying the weight matrix W = diag(w)\n" +
308
+ "to the least squares matrix X and observation vector y. On output, WX\n" +
309
+ "is equal to W^{1/2} X and Wy is equal to W^{1/2} y. It is allowed\n" +
310
+ "for WX = X and Wy = y for an in-place transform."},
311
+ {:func_name=>"gsl_multifit_linear_lcurve",
312
+ :func_type=>"int",
313
+ :args=>
314
+ [["const gsl_vector *", "y"],
315
+ ["gsl_vector *", "reg_param"],
316
+ ["gsl_vector *", "rho"],
317
+ ["gsl_vector *", "eta"],
318
+ ["gsl_multifit_linear_workspace *", "work"]],
319
+ :desc=>
320
+ "This function computes the L-curve for a least squares system\n" +
321
+ "using the right hand side vector y and the SVD decomposition\n" +
322
+ "of the least squares matrix X, which must be provided\n" +
323
+ "to gsl_multifit_linear_svd prior to\n" +
324
+ "calling this function. The output vectors reg_param,\n" +
325
+ "rho, and eta must all be the same size, and will\n" +
326
+ "contain the regularization parameters \\lambda_i, residual norms\n" +
327
+ "||y - X c_i||, and solution norms || L c_i ||\n" +
328
+ "which compose the L-curve, where c_i is the regularized\n" +
329
+ "solution vector corresponding to \\lambda_i.\n" +
330
+ "The user may determine the number of points on the L-curve by\n" +
331
+ "adjusting the size of these input arrays. The regularization\n" +
332
+ "parameters \\lambda_i are estimated from the singular values\n" +
333
+ "of X, and chosen to represent the most relevant portion of\n" +
334
+ "the L-curve."},
335
+ {:func_name=>"gsl_multifit_linear_lcorner",
336
+ :func_type=>"int",
337
+ :args=>
338
+ [["const gsl_vector *", "rho"],
339
+ ["const gsl_vector *", "eta"],
340
+ ["size_t *", "idx"]],
341
+ :desc=>
342
+ "This function attempts to locate the corner of the L-curve\n" +
343
+ "(||y - X c||, ||L c||) defined by the rho and eta\n" +
344
+ "input arrays respectively. The corner is defined as the point of maximum\n" +
345
+ "curvature of the L-curve in log-log scale. The rho and eta\n" +
346
+ "arrays can be outputs of gsl_multifit_linear_lcurve. The\n" +
347
+ "algorithm used simply fits a circle to 3 consecutive points on the L-curve\n" +
348
+ "and uses the circle's radius to determine the curvature at\n" +
349
+ "the middle point. Therefore, the input array sizes must be\n" +
350
+ "\\ge 3. With more points provided for the L-curve, a better\n" +
351
+ "estimate of the curvature can be obtained. The array index\n" +
352
+ "corresponding to maximum curvature (ie: the corner) is returned\n" +
353
+ "in idx. If the input arrays contain colinear points,\n" +
354
+ "this function could fail and return GSL_EINVAL."},
355
+ {:func_name=>"gsl_multifit_linear_lcorner2",
356
+ :func_type=>"int",
357
+ :args=>
358
+ [["const gsl_vector *", "reg_param"],
359
+ ["const gsl_vector *", "eta"],
360
+ ["size_t *", "idx"]],
361
+ :desc=>
362
+ "This function attempts to locate the corner of an alternate L-curve\n" +
363
+ "(\\lambda^2, ||L c||^2) studied by Rezghi and Hosseini, 2009.\n" +
364
+ "This alternate L-curve can provide better estimates of the\n" +
365
+ "regularization parameter for smooth solution vectors. The regularization\n" +
366
+ "parameters \\lambda and solution norms ||L c|| are provided\n" +
367
+ "in the reg_param and eta input arrays respectively. The\n" +
368
+ "corner is defined as the point of maximum curvature of this\n" +
369
+ "alternate L-curve in linear scale. The reg_param and eta\n" +
370
+ "arrays can be outputs of gsl_multifit_linear_lcurve. The\n" +
371
+ "algorithm used simply fits a circle to 3 consecutive points on the L-curve\n" +
372
+ "and uses the circle's radius to determine the curvature at\n" +
373
+ "the middle point. Therefore, the input array sizes must be\n" +
374
+ "\\ge 3. With more points provided for the L-curve, a better\n" +
375
+ "estimate of the curvature can be obtained. The array index\n" +
376
+ "corresponding to maximum curvature (ie: the corner) is returned\n" +
377
+ "in idx. If the input arrays contain colinear points,\n" +
378
+ "this function could fail and return GSL_EINVAL."},
379
+ {:func_name=>"gsl_multifit_linear_Lk",
380
+ :func_type=>"int",
381
+ :args=>[["const size_t", "p"], ["const size_t", "k"], ["gsl_matrix *", "L"]],
382
+ :desc=>
383
+ "This function computes the discrete approximation to the derivative operator L_k of\n" +
384
+ "order k on a regular grid of p points and stores it in L. The dimensions of L are\n" +
385
+ "(p-k)-by-p."},
386
+ {:func_name=>"gsl_multifit_linear_Lsobolev",
387
+ :func_type=>"int",
388
+ :args=>
389
+ [["const size_t", "p"],
390
+ ["const size_t", "kmax"],
391
+ ["const gsl_vector *", "alpha"],
392
+ ["gsl_matrix *", "L"],
393
+ ["gsl_multifit_linear_workspace *", "work"]],
394
+ :desc=>
395
+ "This function computes the regularization matrix L corresponding to the weighted Sobolov norm\n" +
396
+ "||L c||^2 = \\sum_k \\alpha_k^2 ||L_k c||^2 where L_k approximates the derivative\n" +
397
+ "operator of order k. This regularization norm can be useful in applications where\n" +
398
+ "it is necessary to smooth several derivatives of the solution. p is the number of\n" +
399
+ "model parameters, kmax is the highest derivative to include in the summation above, and\n" +
400
+ "alpha is the vector of weights of size kmax + 1, where alpha[k] = \\alpha_k\n" +
401
+ "is the weight assigned to the derivative of order k. The output matrix L is of size\n" +
402
+ "p-by-p."},
403
+ {:func_name=>"gsl_multifit_linear_rcond",
404
+ :func_type=>"double",
405
+ :args=>[["const gsl_multifit_linear_workspace *", "work"]],
406
+ :desc=>
407
+ "This function returns the reciprocal condition number of the least squares matrix X,\n" +
408
+ "defined as the ratio of the smallest and largest singular values, rcond = \\sigma_{min}/\\sigma_{max}.\n" +
409
+ "The routine gsl_multifit_linear_svd must first be called to compute the SVD of X."},
410
+ {:func_name=>"gsl_multifit_robust_alloc",
411
+ :func_type=>"gsl_multifit_robust_workspace *",
412
+ :args=>
413
+ [["const gsl_multifit_robust_type *", "T"],
414
+ ["const size_t", "n"],
415
+ ["const size_t", "p"]],
416
+ :desc=>
417
+ "This function allocates a workspace for fitting a model to n\n" +
418
+ "observations using p parameters. The size of the workspace\n" +
419
+ "is O(np + p^2). The type T specifies the\n" +
420
+ "function \\psi and can be selected from the following choices.\n" +
421
+ "\n" +
422
+ "\n" +
423
+ "\n" +
424
+ "\n" +
425
+ "\n"},
426
+ {:func_name=>"gsl_multifit_robust_free",
427
+ :func_type=>"void",
428
+ :args=>[["gsl_multifit_robust_workspace *", "w"]],
429
+ :desc=>"This function frees the memory associated with the workspace w."},
430
+ {:func_name=>"gsl_multifit_robust_name",
431
+ :func_type=>"const char *",
432
+ :args=>[["const gsl_multifit_robust_workspace *", "w"]],
433
+ :desc=>
434
+ "This function returns the name of the robust type T specified to gsl_multifit_robust_alloc."},
435
+ {:func_name=>"gsl_multifit_robust_tune",
436
+ :func_type=>"int",
437
+ :args=>[["const double", "tune"], ["gsl_multifit_robust_workspace *", "w"]],
438
+ :desc=>
439
+ "This function sets the tuning constant t used to adjust the residuals at each iteration to tune.\n" +
440
+ "Decreasing the tuning constant increases the downweight assigned to large residuals, while increasing\n" +
441
+ "the tuning constant decreases the downweight assigned to large residuals."},
442
+ {:func_name=>"gsl_multifit_robust_maxiter",
443
+ :func_type=>"int",
444
+ :args=>
445
+ [["const size_t", "maxiter"], ["gsl_multifit_robust_workspace *", "w"]],
446
+ :desc=>
447
+ "This function sets the maximum number of iterations in the iteratively\n" +
448
+ "reweighted least squares algorithm to maxiter. By default,\n" +
449
+ "this value is set to 100 by gsl_multifit_robust_alloc."},
450
+ {:func_name=>"gsl_multifit_robust_weights",
451
+ :func_type=>"int",
452
+ :args=>
453
+ [["const gsl_vector *", "r"],
454
+ ["gsl_vector *", "wts"],
455
+ ["gsl_multifit_robust_workspace *", "w"]],
456
+ :desc=>
457
+ "This function assigns weights to the vector wts using the residual vector r and\n" +
458
+ "previously specified weighting function. The output weights are given by wts_i = w(r_i / (t \\sigma)),\n" +
459
+ "where the weighting functions w are detailed in gsl_multifit_robust_alloc. \\sigma\n" +
460
+ "is an estimate of the residual standard deviation based on the Median-Absolute-Deviation and t\n" +
461
+ "is the tuning constant. This\n" +
462
+ "function is useful if the user wishes to implement their own robust regression rather than using\n" +
463
+ "the supplied gsl_multifit_robust routine below."},
464
+ {:func_name=>"gsl_multifit_robust",
465
+ :func_type=>"int",
466
+ :args=>
467
+ [["const gsl_matrix *", "X"],
468
+ ["const gsl_vector *", "y"],
469
+ ["gsl_vector *", "c"],
470
+ ["gsl_matrix *", "cov"],
471
+ ["gsl_multifit_robust_workspace *", "w"]],
472
+ :desc=>
473
+ "This function computes the best-fit parameters c of the model\n" +
474
+ "y = X c for the observations y and the matrix of\n" +
475
+ "predictor variables X, attemping to reduce the influence\n" +
476
+ "of outliers using the algorithm outlined above.\n" +
477
+ "The p-by-p variance-covariance matrix of the model parameters\n" +
478
+ "cov is estimated as \\sigma^2 (X^T X)^{-1}, where \\sigma is\n" +
479
+ "an approximation of the residual standard deviation using the theory of robust\n" +
480
+ "regression. Special care must be taken when estimating \\sigma and\n" +
481
+ "other statistics such as R^2, and so these\n" +
482
+ "are computed internally and are available by calling the function\n" +
483
+ "gsl_multifit_robust_statistics.\n" +
484
+ "\n" +
485
+ "If the coefficients do not converge within the maximum iteration\n" +
486
+ "limit, the function returns GSL_EMAXITER. In this case,\n" +
487
+ "the current estimates of the coefficients and covariance matrix\n" +
488
+ "are returned in c and cov and the internal fit statistics\n" +
489
+ "are computed with these estimates."},
490
+ {:func_name=>"gsl_multifit_robust_est",
491
+ :func_type=>"int",
492
+ :args=>
493
+ [["const gsl_vector *", "x"],
494
+ ["const gsl_vector *", "c"],
495
+ ["const gsl_matrix *", "cov"],
496
+ ["double *", "y"],
497
+ ["double *", "y_err"]],
498
+ :desc=>
499
+ "This function uses the best-fit robust regression coefficients\n" +
500
+ "c and their covariance matrix\n" +
501
+ "cov to compute the fitted function value\n" +
502
+ "y and its standard deviation y_err for the model y = x.c \n" +
503
+ "at the point x."},
504
+ {:func_name=>"gsl_multifit_robust_residuals",
505
+ :func_type=>"int",
506
+ :args=>
507
+ [["const gsl_matrix *", "X"],
508
+ ["const gsl_vector *", "y"],
509
+ ["const gsl_vector *", "c"],
510
+ ["gsl_vector *", "r"],
511
+ ["gsl_multifit_robust_workspace *", "w"]],
512
+ :desc=>
513
+ "This function computes the vector of studentized residuals\n" +
514
+ "r_i = {y_i - (X c)_i \\over \\sigma \\sqrt{1 - h_i}} for\n" +
515
+ "the observations y, coefficients c and matrix of predictor\n" +
516
+ "variables X. The routine gsl_multifit_robust must\n" +
517
+ "first be called to compute the statisical leverages h_i of\n" +
518
+ "the matrix X and residual standard deviation estimate \\sigma."},
519
+ {:func_name=>"gsl_multifit_robust_statistics",
520
+ :func_type=>"gsl_multifit_robust_stats",
521
+ :args=>[["const gsl_multifit_robust_workspace *", "w"]],
522
+ :desc=>
523
+ "This function returns a structure containing relevant statistics from a robust regression. The function\n" +
524
+ "gsl_multifit_robust must be called first to perform the regression and calculate these statistics.\n" +
525
+ "The returned gsl_multifit_robust_stats structure contains the following fields."},
526
+ {:func_name=>"gsl_multifit_fsolver_alloc",
527
+ :func_type=>"gsl_multifit_fsolver *",
528
+ :args=>
529
+ [["const gsl_multifit_fsolver_type *", "T"],
530
+ ["size_t", "n"],
531
+ ["size_t", "p"]],
532
+ :desc=>
533
+ "This function returns a pointer to a newly allocated instance of a\n" +
534
+ "solver of type T for n observations and p parameters.\n" +
535
+ "The number of observations n must be greater than or equal to\n" +
536
+ "parameters p. \n" +
537
+ "\n" +
538
+ "If there is insufficient memory to create the solver then the function\n" +
539
+ "returns a null pointer and the error handler is invoked with an error\n" +
540
+ "code of GSL_ENOMEM."},
541
+ {:func_name=>"gsl_multifit_fdfsolver_alloc",
542
+ :func_type=>"gsl_multifit_fdfsolver *",
543
+ :args=>
544
+ [["const gsl_multifit_fdfsolver_type *", "T"],
545
+ ["size_t", "n"],
546
+ ["size_t", "p"]],
547
+ :desc=>
548
+ "This function returns a pointer to a newly allocated instance of a\n" +
549
+ "derivative solver of type T for n observations and p\n" +
550
+ "parameters. For example, the following code creates an instance of a\n" +
551
+ "Levenberg-Marquardt solver for 100 data points and 3 parameters,\n" +
552
+ "\n" +
553
+ "const gsl_multifit_fdfsolver_type * T \n" +
554
+ " = gsl_multifit_fdfsolver_lmder;\n" +
555
+ "gsl_multifit_fdfsolver * s \n" +
556
+ " = gsl_multifit_fdfsolver_alloc (T, 100, 3);\n" +
557
+ "\n" +
558
+ "The number of observations n must be greater than or equal to\n" +
559
+ "parameters p.\n" +
560
+ "\n" +
561
+ "If there is insufficient memory to create the solver then the function\n" +
562
+ "returns a null pointer and the error handler is invoked with an error\n" +
563
+ "code of GSL_ENOMEM."},
564
+ {:func_name=>"gsl_multifit_fdfridge_alloc",
565
+ :func_type=>"gsl_multifit_fdfridge *",
566
+ :args=>
567
+ [["const gsl_multifit_fdfsolver_type *", "T"],
568
+ ["size_t", "n"],
569
+ ["size_t", "p"]],
570
+ :desc=>
571
+ "This function returns a pointer to a newly allocated instance of a\n" +
572
+ "derivative solver of type T for n observations and p\n" +
573
+ "parameters. The solver will automatically form the augmented\n" +
574
+ "system \\tilde{f}(x) and \\tilde{J} for ridge (Tikhonov)\n" +
575
+ "regression.\n" +
576
+ "If there is insufficient memory to create the solver then the function\n" +
577
+ "returns a null pointer and the error handler is invoked with an error\n" +
578
+ "code of GSL_ENOMEM."},
579
+ {:func_name=>"gsl_multifit_fsolver_set",
580
+ :func_type=>"int",
581
+ :args=>
582
+ [["gsl_multifit_fsolver *", "s"],
583
+ ["gsl_multifit_function *", "f"],
584
+ ["const gsl_vector *", "x"]],
585
+ :desc=>
586
+ "This function initializes, or reinitializes, an existing solver s\n" +
587
+ "to use the function f and the initial guess x."},
588
+ {:func_name=>"gsl_multifit_fdfsolver_set",
589
+ :func_type=>"int",
590
+ :args=>
591
+ [["gsl_multifit_fdfsolver *", "s"],
592
+ ["gsl_multifit_function_fdf *", "fdf"],
593
+ ["const gsl_vector *", "x"]],
594
+ :desc=>
595
+ "These functions initialize, or reinitialize, an existing solver s\n" +
596
+ "to use the function and derivative fdf and the initial guess\n" +
597
+ "x.\n" +
598
+ "\n" +
599
+ "Optionally, a weight vector wts can be given to perform\n" +
600
+ "a weighted nonlinear regression. Here, the weighting matrix is\n" +
601
+ "W = diag(w_1,w_2,...,w_n). The wts vector is referenced\n" +
602
+ "throughout the iteration so it should not be freed by the caller until\n" +
603
+ "the iteration terminates."},
604
+ {:func_name=>"gsl_multifit_fdfsolver_wset",
605
+ :func_type=>"int",
606
+ :args=>
607
+ [["gsl_multifit_fdfsolver *", "s"],
608
+ ["gsl_multifit_function_fdf *", "fdf"],
609
+ ["const gsl_vector *", "x"],
610
+ ["const gsl_vector *", "wts"]],
611
+ :desc=>
612
+ "These functions initialize, or reinitialize, an existing solver s\n" +
613
+ "to use the function and derivative fdf and the initial guess\n" +
614
+ "x.\n" +
615
+ "\n" +
616
+ "Optionally, a weight vector wts can be given to perform\n" +
617
+ "a weighted nonlinear regression. Here, the weighting matrix is\n" +
618
+ "W = diag(w_1,w_2,...,w_n). The wts vector is referenced\n" +
619
+ "throughout the iteration so it should not be freed by the caller until\n" +
620
+ "the iteration terminates."},
621
+ {:func_name=>"gsl_multifit_fdfridge_set",
622
+ :func_type=>"int",
623
+ :args=>
624
+ [["gsl_multifit_fdfridge *", "s"],
625
+ ["gsl_multifit_function_fdf *", "fdf"],
626
+ ["const gsl_vector *", "x"],
627
+ ["const double", "lambda"]],
628
+ :desc=>
629
+ "This function initializes, or reinitializes, an existing ridge solver\n" +
630
+ "s to use the function and derivative fdf and the initial guess\n" +
631
+ "x. Here, the regularization matrix is set to L = \\lambda I,\n" +
632
+ "with \\lambda specified in lambda.\n" +
633
+ "\n" +
634
+ "Optionally, a weight vector wts can be given to perform\n" +
635
+ "a weighted nonlinear regression. Here, the weighting matrix is\n" +
636
+ "W = diag(w_1,w_2,...,w_n). The wts vector is referenced\n" +
637
+ "throughout the iteration so it should not be freed by the caller until\n" +
638
+ "the iteration terminates."},
639
+ {:func_name=>"gsl_multifit_fdfridge_wset",
640
+ :func_type=>"int",
641
+ :args=>
642
+ [["gsl_multifit_fdfridge *", "s"],
643
+ ["gsl_multifit_function_fdf *", "fdf"],
644
+ ["const gsl_vector *", "x"],
645
+ ["const double", "lambda"],
646
+ ["const gsl_vector *", "wts"]],
647
+ :desc=>
648
+ "This function initializes, or reinitializes, an existing ridge solver\n" +
649
+ "s to use the function and derivative fdf and the initial guess\n" +
650
+ "x. Here, the regularization matrix is set to L = \\lambda I,\n" +
651
+ "with \\lambda specified in lambda.\n" +
652
+ "\n" +
653
+ "Optionally, a weight vector wts can be given to perform\n" +
654
+ "a weighted nonlinear regression. Here, the weighting matrix is\n" +
655
+ "W = diag(w_1,w_2,...,w_n). The wts vector is referenced\n" +
656
+ "throughout the iteration so it should not be freed by the caller until\n" +
657
+ "the iteration terminates."},
658
+ {:func_name=>"gsl_multifit_fdfridge_set2",
659
+ :func_type=>"int",
660
+ :args=>
661
+ [["gsl_multifit_fdfridge *", "s"],
662
+ ["gsl_multifit_function_fdf *", "fdf"],
663
+ ["const gsl_vector *", "x"],
664
+ ["const gsl_vector *", "lambda"]],
665
+ :desc=>
666
+ "This function initializes, or reinitializes, an existing ridge solver\n" +
667
+ "s to use the function and derivative fdf and the initial\n" +
668
+ "guess x. Here, the regularization matrix is set to\n" +
669
+ "L = diag(\\lambda_1,\\lambda_2,...,\\lambda_p), where\n" +
670
+ "the \\lambda_i are given in lambda.\n" +
671
+ "\n" +
672
+ "Optionally, a weight vector wts can be given to perform\n" +
673
+ "a weighted nonlinear regression. Here, the weighting matrix is\n" +
674
+ "W = diag(w_1,w_2,...,w_n). The wts vector is referenced\n" +
675
+ "throughout the iteration so it should not be freed by the caller until\n" +
676
+ "the iteration terminates."},
677
+ {:func_name=>"gsl_multifit_fdfridge_wset2",
678
+ :func_type=>"int",
679
+ :args=>
680
+ [["gsl_multifit_fdfridge *", "s"],
681
+ ["gsl_multifit_function_fdf *", "fdf"],
682
+ ["const gsl_vector *", "x"],
683
+ ["const gsl_vector *", "lambda"],
684
+ ["const gsl_vector *", "wts"]],
685
+ :desc=>
686
+ "This function initializes, or reinitializes, an existing ridge solver\n" +
687
+ "s to use the function and derivative fdf and the initial\n" +
688
+ "guess x. Here, the regularization matrix is set to\n" +
689
+ "L = diag(\\lambda_1,\\lambda_2,...,\\lambda_p), where\n" +
690
+ "the \\lambda_i are given in lambda.\n" +
691
+ "\n" +
692
+ "Optionally, a weight vector wts can be given to perform\n" +
693
+ "a weighted nonlinear regression. Here, the weighting matrix is\n" +
694
+ "W = diag(w_1,w_2,...,w_n). The wts vector is referenced\n" +
695
+ "throughout the iteration so it should not be freed by the caller until\n" +
696
+ "the iteration terminates."},
697
+ {:func_name=>"gsl_multifit_fdfridge_set3",
698
+ :func_type=>"int",
699
+ :args=>
700
+ [["gsl_multifit_fdfridge *", "s"],
701
+ ["gsl_multifit_function_fdf *", "fdf"],
702
+ ["const gsl_vector *", "x"],
703
+ ["const gsl_matrix *", "L"]],
704
+ :desc=>
705
+ "This function initializes, or reinitializes, an existing ridge solver\n" +
706
+ "s to use the function and derivative fdf and the initial\n" +
707
+ "guess x. Here, the regularization matrix is set to L,\n" +
708
+ "which must have p columns but may have any number of rows.\n" +
709
+ "\n" +
710
+ "Optionally, a weight vector wts can be given to perform\n" +
711
+ "a weighted nonlinear regression. Here, the weighting matrix is\n" +
712
+ "W = diag(w_1,w_2,...,w_n). The wts vector is referenced\n" +
713
+ "throughout the iteration so it should not be freed by the caller until\n" +
714
+ "the iteration terminates."},
715
+ {:func_name=>"gsl_multifit_fdfridge_wset3",
716
+ :func_type=>"int",
717
+ :args=>
718
+ [["gsl_multifit_fdfridge *", "s"],
719
+ ["gsl_multifit_function_fdf *", "fdf"],
720
+ ["const gsl_vector *", "x"],
721
+ ["const gsl_matrix *", "L"],
722
+ ["const gsl_vector *", "wts"]],
723
+ :desc=>
724
+ "This function initializes, or reinitializes, an existing ridge solver\n" +
725
+ "s to use the function and derivative fdf and the initial\n" +
726
+ "guess x. Here, the regularization matrix is set to L,\n" +
727
+ "which must have p columns but may have any number of rows.\n" +
728
+ "\n" +
729
+ "Optionally, a weight vector wts can be given to perform\n" +
730
+ "a weighted nonlinear regression. Here, the weighting matrix is\n" +
731
+ "W = diag(w_1,w_2,...,w_n). The wts vector is referenced\n" +
732
+ "throughout the iteration so it should not be freed by the caller until\n" +
733
+ "the iteration terminates."},
734
+ {:func_name=>"gsl_multifit_fsolver_free",
735
+ :func_type=>"void",
736
+ :args=>[["gsl_multifit_fsolver *", "s"]],
737
+ :desc=>"These functions free all the memory associated with the solver s."},
738
+ {:func_name=>"gsl_multifit_fdfsolver_free",
739
+ :func_type=>"void",
740
+ :args=>[["gsl_multifit_fdfsolver *", "s"]],
741
+ :desc=>"These functions free all the memory associated with the solver s."},
742
+ {:func_name=>"gsl_multifit_fdfridge_free",
743
+ :func_type=>"void",
744
+ :args=>[["gsl_multifit_fdfridge *", "s"]],
745
+ :desc=>"These functions free all the memory associated with the solver s."},
746
+ {:func_name=>"gsl_multifit_fsolver_name",
747
+ :func_type=>"const char *",
748
+ :args=>[["const gsl_multifit_fsolver *", "s"]],
749
+ :desc=>
750
+ "These functions return a pointer to the name of the solver. For example,\n" +
751
+ "\n" +
752
+ "printf (\"s is a '%s' solver\\n\", \n" +
753
+ " gsl_multifit_fdfsolver_name (s));\n" +
754
+ "\n" +
755
+ "would print something like s is a 'lmder' solver."},
756
+ {:func_name=>"gsl_multifit_fdfsolver_name",
757
+ :func_type=>"const char *",
758
+ :args=>[["const gsl_multifit_fdfsolver *", "s"]],
759
+ :desc=>
760
+ "These functions return a pointer to the name of the solver. For example,\n" +
761
+ "\n" +
762
+ "printf (\"s is a '%s' solver\\n\", \n" +
763
+ " gsl_multifit_fdfsolver_name (s));\n" +
764
+ "\n" +
765
+ "would print something like s is a 'lmder' solver."},
766
+ {:func_name=>"gsl_multifit_fdfridge_name",
767
+ :func_type=>"const char *",
768
+ :args=>[["const gsl_multifit_fdfridge *", "s"]],
769
+ :desc=>
770
+ "These functions return a pointer to the name of the solver. For example,\n" +
771
+ "\n" +
772
+ "printf (\"s is a '%s' solver\\n\", \n" +
773
+ " gsl_multifit_fdfsolver_name (s));\n" +
774
+ "\n" +
775
+ "would print something like s is a 'lmder' solver."},
776
+ {:func_name=>"gsl_multifit_fdfsolver_dif_df",
777
+ :func_type=>"int",
778
+ :args=>
779
+ [["const gsl_vector *", "x"],
780
+ ["const gsl_vector *", "wts"],
781
+ ["gsl_multifit_function_fdf *", "fdf"],
782
+ ["const gsl_vector *", "f"],
783
+ ["gsl_matrix *", "J"]],
784
+ :desc=>
785
+ "This function takes as input the current position x, weight\n" +
786
+ "vector wts and function values computed at the current position\n" +
787
+ "f, along with fdf which specifies the fit function and\n" +
788
+ "parameters and approximates the\n" +
789
+ "n-by-p Jacobian J using forward finite differences:\n" +
790
+ "$J_{ij} = \\sqrt{w_i} \\partial f_i(x) / \\partial x_j \\approx \\sqrt{w_i} (f_i(x + h_j e_j) - f_i(x)) / h_j$\n" +
791
+ "J_ij = sqrt(w_i) d f_i(x) / d x_j = sqrt(w_i) (f_i(x + h_j e_j) - f_i(x)) / h_j.\n" +
792
+ "where h_j = \\epsilon |x_j|, and \\epsilon is the\n" +
793
+ "square root of the machine precision GSL_DBL_EPSILON."},
794
+ {:func_name=>"gsl_multifit_fdfsolver_dif_fdf",
795
+ :func_type=>"int",
796
+ :args=>
797
+ [["const gsl_vector *", "x"],
798
+ ["gsl_multifit_function_fdf *", "fdf"],
799
+ ["gsl_vector *", "f"],
800
+ ["gsl_matrix *", "J"]],
801
+ :desc=>
802
+ "This function is deprecated and will be removed in a future release."},
803
+ {:func_name=>"gsl_multifit_fsolver_iterate",
804
+ :func_type=>"int",
805
+ :args=>[["gsl_multifit_fsolver *", "s"]],
806
+ :desc=>
807
+ "These functions perform a single iteration of the solver s. If\n" +
808
+ "the iteration encounters an unexpected problem then an error code will\n" +
809
+ "be returned. The solver maintains a current estimate of the best-fit\n" +
810
+ "parameters at all times. "},
811
+ {:func_name=>"gsl_multifit_fdfsolver_iterate",
812
+ :func_type=>"int",
813
+ :args=>[["gsl_multifit_fdfsolver *", "s"]],
814
+ :desc=>
815
+ "These functions perform a single iteration of the solver s. If\n" +
816
+ "the iteration encounters an unexpected problem then an error code will\n" +
817
+ "be returned. The solver maintains a current estimate of the best-fit\n" +
818
+ "parameters at all times. "},
819
+ {:func_name=>"gsl_multifit_fdfridge_iterate",
820
+ :func_type=>"int",
821
+ :args=>[["gsl_multifit_fdfridge *", "s"]],
822
+ :desc=>
823
+ "These functions perform a single iteration of the solver s. If\n" +
824
+ "the iteration encounters an unexpected problem then an error code will\n" +
825
+ "be returned. The solver maintains a current estimate of the best-fit\n" +
826
+ "parameters at all times. "},
827
+ {:func_name=>"gsl_multifit_fsolver_position",
828
+ :func_type=>"gsl_vector *",
829
+ :args=>[["const gsl_multifit_fsolver *", "s"]],
830
+ :desc=>
831
+ "These functions return the current position x (i.e. best-fit\n" +
832
+ "parameters) of the solver s."},
833
+ {:func_name=>"gsl_multifit_fdfsolver_position",
834
+ :func_type=>"gsl_vector *",
835
+ :args=>[["const gsl_multifit_fdfsolver *", "s"]],
836
+ :desc=>
837
+ "These functions return the current position x (i.e. best-fit\n" +
838
+ "parameters) of the solver s."},
839
+ {:func_name=>"gsl_multifit_fdfridge_position",
840
+ :func_type=>"gsl_vector *",
841
+ :args=>[["const gsl_multifit_fdfridge *", "s"]],
842
+ :desc=>
843
+ "These functions return the current position x (i.e. best-fit\n" +
844
+ "parameters) of the solver s."},
845
+ {:func_name=>"gsl_multifit_fdfsolver_residual",
846
+ :func_type=>"gsl_vector *",
847
+ :args=>[["const gsl_multifit_fdfsolver *", "s"]],
848
+ :desc=>
849
+ "These functions return the current residual vector f of the\n" +
850
+ "solver s. For weighted cases, the residual vector includes the\n" +
851
+ "weighting factor \\sqrt{W}. For ridge regression, the residual\n" +
852
+ "vector is the augmented vector \\tilde{f}."},
853
+ {:func_name=>"gsl_multifit_fdfridge_residual",
854
+ :func_type=>"gsl_vector *",
855
+ :args=>[["const gsl_multifit_fdfridge *", "s"]],
856
+ :desc=>
857
+ "These functions return the current residual vector f of the\n" +
858
+ "solver s. For weighted cases, the residual vector includes the\n" +
859
+ "weighting factor \\sqrt{W}. For ridge regression, the residual\n" +
860
+ "vector is the augmented vector \\tilde{f}."},
861
+ {:func_name=>"gsl_multifit_fdfsolver_niter",
862
+ :func_type=>"size_t",
863
+ :args=>[["const gsl_multifit_fdfsolver *", "s"]],
864
+ :desc=>
865
+ "These functions return the number of iterations performed so far.\n" +
866
+ "The iteration counter is updated on each call to the\n" +
867
+ "_iterate functions above, and reset to 0 in the\n" +
868
+ "_set functions."},
869
+ {:func_name=>"gsl_multifit_fdfridge_niter",
870
+ :func_type=>"size_t",
871
+ :args=>[["const gsl_multifit_fdfridge *", "s"]],
872
+ :desc=>
873
+ "These functions return the number of iterations performed so far.\n" +
874
+ "The iteration counter is updated on each call to the\n" +
875
+ "_iterate functions above, and reset to 0 in the\n" +
876
+ "_set functions."},
877
+ {:func_name=>"gsl_multifit_fdfsolver_test",
878
+ :func_type=>"int",
879
+ :args=>
880
+ [["const gsl_multifit_fdfsolver *", "s"],
881
+ ["const double", "xtol"],
882
+ ["const double", "gtol"],
883
+ ["const double", "ftol"],
884
+ ["int *", "info"]],
885
+ :desc=>
886
+ "This function tests for convergence of the minimization method\n" +
887
+ "using the following criteria:\n" +
888
+ "\n" +
889
+ "\n" +
890
+ "If none of the tests succeed, info is set to 0 and the\n" +
891
+ "function returns GSL_CONTINUE, indicating further iterations\n" +
892
+ "are required.\n"},
893
+ {:func_name=>"gsl_multifit_test_delta",
894
+ :func_type=>"int",
895
+ :args=>
896
+ [["const gsl_vector *", "dx"],
897
+ ["const gsl_vector *", "x"],
898
+ ["double", "epsabs"],
899
+ ["double", "epsrel"]],
900
+ :desc=>
901
+ "\n" +
902
+ "This function tests for the convergence of the sequence by comparing the\n" +
903
+ "last step dx with the absolute error epsabs and relative\n" +
904
+ "error epsrel to the current position x. The test returns\n" +
905
+ "GSL_SUCCESS if the following condition is achieved,\n" +
906
+ "\n" +
907
+ "|dx_i| < epsabs + epsrel |x_i|\n" +
908
+ "\n" +
909
+ "for each component of x and returns GSL_CONTINUE otherwise."},
910
+ {:func_name=>"gsl_multifit_test_gradient",
911
+ :func_type=>"int",
912
+ :args=>[["const gsl_vector *", "g"], ["double", "epsabs"]],
913
+ :desc=>
914
+ "This function tests the residual gradient g against the absolute\n" +
915
+ "error bound epsabs. Mathematically, the gradient should be\n" +
916
+ "exactly zero at the minimum. The test returns GSL_SUCCESS if the\n" +
917
+ "following condition is achieved,\n" +
918
+ "\n" +
919
+ "\\sum_i |g_i| < epsabs\n" +
920
+ "\n" +
921
+ "and returns GSL_CONTINUE otherwise. This criterion is suitable\n" +
922
+ "for situations where the precise location of the minimum, x,\n" +
923
+ "is unimportant provided a value can be found where the gradient is small\n" +
924
+ "enough."},
925
+ {:func_name=>"gsl_multifit_gradient",
926
+ :func_type=>"int",
927
+ :args=>
928
+ [["const gsl_matrix *", "J"],
929
+ ["const gsl_vector *", "f"],
930
+ ["gsl_vector *", "g"]],
931
+ :desc=>
932
+ "This function computes the gradient g of \\Phi(x) = (1/2)\n" +
933
+ "||f(x)||^2 from the Jacobian matrix J and the function values\n" +
934
+ "f, using the formula g = J^T f."},
935
+ {:func_name=>"gsl_multifit_fsolver_driver",
936
+ :func_type=>"int",
937
+ :args=>
938
+ [["gsl_multifit_fsolver *", "s"],
939
+ ["const size_t", "maxiter"],
940
+ ["const double", "epsabs"],
941
+ ["const double", "epsrel"]],
942
+ :desc=>
943
+ "This function iterates the solver s for a maximum of maxiter\n" +
944
+ "iterations. After each iteration, the system is tested for convergence\n" +
945
+ "using gsl_multifit_test_delta with the error tolerances epsabs\n" +
946
+ "and epsrel."},
947
+ {:func_name=>"gsl_multifit_fdfsolver_driver",
948
+ :func_type=>"int",
949
+ :args=>
950
+ [["gsl_multifit_fdfsolver *", "s"],
951
+ ["const size_t", "maxiter"],
952
+ ["const double", "xtol"],
953
+ ["const double", "gtol"],
954
+ ["const double", "ftol"],
955
+ ["int *", "info"]],
956
+ :desc=>
957
+ "These functions iterate the solver s for a maximum of maxiter\n" +
958
+ "iterations. After each iteration, the system is tested for convergence\n" +
959
+ "with the error tolerances xtol, gtol and ftol.\n" +
960
+ "Upon successful convergence,\n" +
961
+ "the function returns GSL_SUCCESS and sets info to\n" +
962
+ "the reason for convergence (see gsl_multifit_fdfsolver_test).\n" +
963
+ "Otherwise, the function returns GSL_EMAXITER indicating\n" +
964
+ "the system did not converge after maxiter iterations."},
965
+ {:func_name=>"gsl_multifit_fdfridge_driver",
966
+ :func_type=>"int",
967
+ :args=>
968
+ [["gsl_multifit_fdfridge *", "s"],
969
+ ["const size_t", "maxiter"],
970
+ ["const double", "xtol"],
971
+ ["const double", "gtol"],
972
+ ["const double", "ftol"],
973
+ ["int *", "info"]],
974
+ :desc=>
975
+ "These functions iterate the solver s for a maximum of maxiter\n" +
976
+ "iterations. After each iteration, the system is tested for convergence\n" +
977
+ "with the error tolerances xtol, gtol and ftol.\n" +
978
+ "Upon successful convergence,\n" +
979
+ "the function returns GSL_SUCCESS and sets info to\n" +
980
+ "the reason for convergence (see gsl_multifit_fdfsolver_test).\n" +
981
+ "Otherwise, the function returns GSL_EMAXITER indicating\n" +
982
+ "the system did not converge after maxiter iterations."},
983
+ {:func_name=>"gsl_multifit_fdfsolver_jac",
984
+ :func_type=>"int",
985
+ :args=>[["gsl_multifit_fdfsolver *", "s"], ["gsl_matrix *", "J"]],
986
+ :desc=>
987
+ "This function stores the n-by-p Jacobian matrix for the\n" +
988
+ "current iteration of the solver s into the output J."},
989
+ {:func_name=>"gsl_multifit_covar",
990
+ :func_type=>"int",
991
+ :args=>
992
+ [["const gsl_matrix *", "J"],
993
+ ["const double", "epsrel"],
994
+ ["gsl_matrix *", "covar"]],
995
+ :desc=>
996
+ "This function computes the covariance matrix of best-fit parameters\n" +
997
+ "using the Jacobian matrix J and stores it in covar.\n" +
998
+ "The parameter epsrel is used to remove linear-dependent columns\n" +
999
+ "when J is rank deficient.\n" +
1000
+ "\n" +
1001
+ "The covariance matrix is given by,\n" +
1002
+ "\n" +
1003
+ "covar = (J^T J)^@{-1@}\n" +
1004
+ "\n" +
1005
+ "or in the weighted case,\n" +
1006
+ "\n" +
1007
+ "covar = (J^T W J)^@{-1@}\n" +
1008
+ "\n" +
1009
+ "and is computed by QR decomposition of J with column-pivoting. Any\n" +
1010
+ "columns of R which satisfy \n" +
1011
+ "\n" +
1012
+ "|R_@{kk@}| <= epsrel |R_@{11@}|\n" +
1013
+ "\n" +
1014
+ "are considered linearly-dependent and are excluded from the covariance\n" +
1015
+ "matrix (the corresponding rows and columns of the covariance matrix are\n" +
1016
+ "set to zero).\n" +
1017
+ "\n" +
1018
+ "If the minimisation uses the weighted least-squares function\n" +
1019
+ "f_i = (Y(x, t_i) - y_i) / \\sigma_i then the covariance\n" +
1020
+ "matrix above gives the statistical error on the best-fit parameters\n" +
1021
+ "resulting from the Gaussian errors \\sigma_i on \n" +
1022
+ "the underlying data y_i. This can be verified from the relation \n" +
1023
+ "\\delta f = J \\delta c and the fact that the fluctuations in f\n" +
1024
+ "from the data y_i are normalised by \\sigma_i and \n" +
1025
+ "so satisfy $\\langle \\delta f \\delta f^T \\rangle = I$\n" +
1026
+ "<\\delta f \\delta f^T> = I.\n" +
1027
+ "\n" +
1028
+ "For an unweighted least-squares function f_i = (Y(x, t_i) -\n" +
1029
+ "y_i) the covariance matrix above should be multiplied by the variance\n" +
1030
+ "of the residuals about the best-fit \\sigma^2 = \\sum (y_i - Y(x,t_i))^2 / (n-p)\n" +
1031
+ "to give the variance-covariance\n" +
1032
+ "matrix \\sigma^2 C. This estimates the statistical error on the\n" +
1033
+ "best-fit parameters from the scatter of the underlying data.\n" +
1034
+ "\n" +
1035
+ "For more information about covariance matrices see Fitting Overview."}]